File size: 1,586 Bytes
dc03fa5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""THOX mesh node agent.



One module, three hosts: a Google Colab notebook, a Hugging Face CPU Space and a

local machine all run the same agent. It serves an OpenAI-compatible endpoint,

self-registers into the MeshStack mesh, heartbeats telemetry so ThoxRoute can

rank it, and leaves cleanly (or lapses by lease) when the session dies.



See ``ARCHITECTURE.md`` for the endpoint/telemetry/lease contract this

implements and its provenance in the Mesh backend lane.

"""

from __future__ import annotations

__version__ = "1.1.0"

from .agent import NodeAgent, run
from .config import NodeConfig, load_config
from .gpu import GpuInfo, has_gpu, probe_gpu, resolve_gpu_layers
from .errors import (
    BackendError,
    ConfigError,
    MeshRejectedError,
    MeshTransportError,
    NodeError,
    PublicUrlRejectedError,
    TunnelError,
)
from .mesh_client import ControllerClient, DeviceV2Client, MeshClient, NullClient, Registration
from .signing import DeviceIdentity
from .telemetry import TelemetryRecorder, is_lease_expired

__all__ = [
    "NodeAgent",
    "run",
    "NodeConfig",
    "load_config",
    "DeviceIdentity",
    "TelemetryRecorder",
    "is_lease_expired",
    "GpuInfo",
    "has_gpu",
    "probe_gpu",
    "resolve_gpu_layers",
    "MeshClient",
    "DeviceV2Client",
    "ControllerClient",
    "NullClient",
    "Registration",
    "NodeError",
    "ConfigError",
    "BackendError",
    "TunnelError",
    "MeshTransportError",
    "MeshRejectedError",
    "PublicUrlRejectedError",
    "__version__",
]