076914e5b7
- Split client, native, remote, serve, markdown, and SDK internals into focused packages with direct imports. - Move local and remote transport framing/protocol helpers behind clearer module boundaries. - Break up the extension injected DOM logic into a separate content dispatch bundle and dedicated content modules. - Add explicit client handling for passive remote discovery without noisy PQ warnings. - Keep behavior covered with updated unit, integration, and extension tests.
17 lines
550 B
Python
17 lines
550 B
Python
"""Extension-control namespace: ``b.extension.*``."""
|
|
from __future__ import annotations
|
|
|
|
from browser_cli.sdk.base import Namespace, sdk_command
|
|
|
|
class ExtensionNS(Namespace):
|
|
"""Control the browser-cli extension itself."""
|
|
|
|
@sdk_command("extension.reload")
|
|
def reload(self) -> None:
|
|
"""Reload the browser-cli extension service worker.
|
|
|
|
Schedules a ``chrome.runtime.reload()`` inside the extension and returns
|
|
immediately. The extension restarts ~200 ms later and reconnects via the
|
|
keepalive alarm within ~25 seconds.
|
|
"""
|