trance 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- trance/__init__.py +36 -0
- trance/cli_model.py +724 -0
- trance/discovery.py +230 -0
- trance/models.py +481 -0
- trance/sources/__init__.py +7 -0
- trance/sources/aws_bedrock.py +221 -0
- trance/sources/claude_code.py +120 -0
- trance/sources/cloud_api.py +137 -0
- trance/sources/codex.py +71 -0
- trance/sources/cody.py +88 -0
- trance/sources/compatible_api.py +67 -0
- trance/sources/copilot.py +100 -0
- trance/sources/cursor.py +86 -0
- trance/sources/env_api.py +65 -0
- trance/sources/gemini_cli.py +128 -0
- trance/sources/google_vertex.py +155 -0
- trance/sources/grok_consumer.py +126 -0
- trance/sources/huggingface_login.py +58 -0
- trance/sources/kimi_code.py +110 -0
- trance/sources/kiro.py +38 -0
- trance/sources/minimax_coding.py +49 -0
- trance/sources/mistral_vibe.py +64 -0
- trance/sources/opencode.py +130 -0
- trance/sources/poe.py +29 -0
- trance/sources/qwen_code.py +96 -0
- trance/sources/tabnine.py +42 -0
- trance/sources/zai.py +53 -0
- trance/types.py +63 -0
- trance-0.1.0.dist-info/METADATA +229 -0
- trance-0.1.0.dist-info/RECORD +32 -0
- trance-0.1.0.dist-info/WHEEL +4 -0
- trance-0.1.0.dist-info/licenses/LICENSE +21 -0
trance/__init__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Discover local model sessions and expose them through a stable API.
|
|
2
|
+
|
|
3
|
+
The package root intentionally avoids importing discovery and model adapters
|
|
4
|
+
until a caller uses them. This keeps a plain ``import trance`` inexpensive.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from importlib import import_module
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
__version__ = "0.1.0"
|
|
13
|
+
|
|
14
|
+
_EXPORTS = {
|
|
15
|
+
"scan": ("trance.discovery", "scan"),
|
|
16
|
+
"clients": ("trance.discovery", "clients"),
|
|
17
|
+
"Candidate": ("trance.types", "Candidate"),
|
|
18
|
+
"FoundModel": ("trance.types", "FoundModel"),
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
__all__ = ["__version__", *_EXPORTS]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def __getattr__(name: str) -> Any:
|
|
25
|
+
"""Load public API objects only when requested."""
|
|
26
|
+
try:
|
|
27
|
+
module_name, attribute = _EXPORTS[name]
|
|
28
|
+
except KeyError:
|
|
29
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
|
|
30
|
+
value = getattr(import_module(module_name), attribute)
|
|
31
|
+
globals()[name] = value
|
|
32
|
+
return value
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def __dir__() -> list[str]:
|
|
36
|
+
return sorted(set(globals()) | set(__all__))
|