refactor: modularize auth transport and markdown
Testing / remote-protocol-compat (0.9.5) (push) Successful in 1m4s
Testing / test (push) Successful in 1m22s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 1m7s
Package Extension / package-extension (push) Successful in 1m1s
Build & Publish Package / publish (push) Successful in 1m5s
Testing / remote-protocol-compat (0.9.5) (push) Successful in 1m4s
Testing / test (push) Successful in 1m22s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 1m7s
Package Extension / package-extension (push) Successful in 1m1s
Build & Publish Package / publish (push) Successful in 1m5s
- Split auth into focused package modules for agent keys, file keys, signing, and post-quantum transport helpers while keeping the public browser_cli.auth import surface intact. - Move transport encoding internals into a package with separate codec and binary-hoisting helpers, preserving browser_cli.transport compatibility. - Extract remote TCP auth/socket helpers and serve challenge setup out of the runtime paths to make connection handling easier to reason about. - Move the extension markdown extractor into a dedicated content/markdown folder with separate root selection, code normalization, renderer, and utils. - Centralize CLI Rich rendering helpers for tab/window tree and table output, and add rendering tests for the shared builders. - Remove local typing ignores in SDK/decorator/script plumbing and bump the package and extension version to 0.15.3.
This commit is contained in:
@@ -12,7 +12,7 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
import functools
|
||||
from collections.abc import Callable
|
||||
from typing import TypeVar
|
||||
from typing import TypeVar, cast
|
||||
|
||||
from browser_cli.models import Group, Tab
|
||||
from browser_cli.sdk import NAMESPACE_NAMES
|
||||
@@ -74,7 +74,7 @@ class AsyncDecoratorsNS(WorkflowDecoratorsMixin):
|
||||
finally:
|
||||
if cleanup is not None:
|
||||
await self._maybe_await(cleanup(value))
|
||||
return wrapper # type: ignore[return-value]
|
||||
return cast(F, wrapper)
|
||||
return decorator(func) if func is not None else decorator
|
||||
|
||||
def new_tab(
|
||||
@@ -117,7 +117,7 @@ class AsyncDecoratorsNS(WorkflowDecoratorsMixin):
|
||||
finally:
|
||||
if previous:
|
||||
await self._c.perf.set_profile(previous)
|
||||
return wrapper # type: ignore[return-value]
|
||||
return cast(F, wrapper)
|
||||
return decorator
|
||||
|
||||
def retry(
|
||||
@@ -142,8 +142,8 @@ class AsyncDecoratorsNS(WorkflowDecoratorsMixin):
|
||||
raise
|
||||
if delay > 0:
|
||||
await asyncio.sleep(delay)
|
||||
raise last_error # type: ignore[misc]
|
||||
return wrapper # type: ignore[return-value]
|
||||
raise cast(BaseException, last_error)
|
||||
return cast(F, wrapper)
|
||||
return decorator
|
||||
|
||||
class AsyncBrowserCLI:
|
||||
|
||||
Reference in New Issue
Block a user