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:
@@ -5,7 +5,7 @@ import asyncio
|
||||
import functools
|
||||
import inspect
|
||||
from collections.abc import Callable
|
||||
from typing import TypeVar
|
||||
from typing import TypeVar, cast
|
||||
|
||||
from browser_cli.sdk.base import Namespace
|
||||
from browser_cli.sdk.workflow_decorators import WorkflowDecoratorsMixin, _NO_INJECT
|
||||
@@ -53,7 +53,7 @@ class DecoratorsNS(WorkflowDecoratorsMixin, Namespace):
|
||||
finally:
|
||||
if cleanup is not None:
|
||||
await asyncio.to_thread(cleanup, value)
|
||||
return async_wrapper # type: ignore[return-value]
|
||||
return cast(F, async_wrapper)
|
||||
return WorkflowDecoratorsMixin._value_decorator(
|
||||
self, fn, get_value, keyword=keyword, cleanup=cleanup
|
||||
)
|
||||
@@ -74,7 +74,7 @@ class DecoratorsNS(WorkflowDecoratorsMixin, Namespace):
|
||||
finally:
|
||||
if previous:
|
||||
await asyncio.to_thread(self._c.perf.set_profile, previous)
|
||||
return async_wrapper # type: ignore[return-value]
|
||||
return cast(F, async_wrapper)
|
||||
return WorkflowDecoratorsMixin.performance_profile(self, profile, restore=restore)(fn)
|
||||
return decorator
|
||||
|
||||
@@ -101,7 +101,7 @@ class DecoratorsNS(WorkflowDecoratorsMixin, Namespace):
|
||||
raise
|
||||
if delay > 0:
|
||||
await asyncio.sleep(delay)
|
||||
raise last_error # type: ignore[misc]
|
||||
return async_wrapper # type: ignore[return-value]
|
||||
raise cast(BaseException, last_error)
|
||||
return cast(F, async_wrapper)
|
||||
return WorkflowDecoratorsMixin.retry(self, times=times, delay=delay, exceptions=exceptions)(fn)
|
||||
return decorator
|
||||
|
||||
Reference in New Issue
Block a user