MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / get_bridge

Function get_bridge

masfactory/visualizer/client.py:356–362  ·  view source on GitHub ↗

Return a Visualizer bridge without forcing a connection. This is an alias for `get_client()` kept for naming consistency with older code. It only returns a bridge when the Visualizer runtime is enabled via environment.

()

Source from the content-addressed store, hash-verified

354 return client
355
356def get_bridge() -> VisualizerBridge | None:
357 """Return a Visualizer bridge without forcing a connection.
358
359 This is an alias for `get_client()` kept for naming consistency with older code.
360 It only returns a bridge when the Visualizer runtime is enabled via environment.
361 """
362 return get_client()
363
364def connect_bridge(*, timeout_s: float = 2.0) -> VisualizerBridge | None:
365 """Return a connected Visualizer bridge (best-effort).

Callers 2

invokeMethod · 0.90
buildMethod · 0.90

Calls 1

get_clientFunction · 0.85

Tested by

no test coverage detected