Files
daniel156161 076914e5b7 refactor: reorganize client transport and extension internals
- 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.
2026-06-13 23:31:24 +02:00

24 lines
958 B
Python

"""Performance and background-jobs namespace: ``b.perf.*``."""
from __future__ import annotations
from browser_cli.sdk.base import Namespace, sdk_command
class PerfNS(Namespace):
"""Inspect the performance profile and manage background jobs."""
@sdk_command("perf.status", default={})
def status(self) -> dict:
"""Return current performance profile, throttle info, and running jobs."""
@sdk_command("perf.set_profile", lambda self, profile: {"profile": profile}, default={})
def set_profile(self, profile: str) -> dict:
"""Set the global extension performance profile."""
@sdk_command("jobs.status", lambda self, job_id: {"jobId": job_id}, default={})
def job_status(self, job_id: str) -> dict:
"""Return status/progress for a background job."""
@sdk_command("jobs.cancel", lambda self, job_id: {"jobId": job_id}, default={})
def job_cancel(self, job_id: str) -> dict:
"""Request cancellation for a background job."""