glaip-sdk 0.0.5b1__py3-none-any.whl → 0.0.7__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.
- glaip_sdk/__init__.py +1 -1
- glaip_sdk/_version.py +42 -19
- glaip_sdk/branding.py +3 -2
- glaip_sdk/cli/commands/__init__.py +1 -1
- glaip_sdk/cli/commands/agents.py +452 -285
- glaip_sdk/cli/commands/configure.py +14 -13
- glaip_sdk/cli/commands/mcps.py +30 -20
- glaip_sdk/cli/commands/models.py +5 -3
- glaip_sdk/cli/commands/tools.py +111 -106
- glaip_sdk/cli/display.py +48 -27
- glaip_sdk/cli/io.py +1 -1
- glaip_sdk/cli/main.py +26 -5
- glaip_sdk/cli/resolution.py +5 -4
- glaip_sdk/cli/utils.py +437 -188
- glaip_sdk/cli/validators.py +7 -2
- glaip_sdk/client/agents.py +276 -153
- glaip_sdk/client/base.py +69 -27
- glaip_sdk/client/tools.py +44 -26
- glaip_sdk/client/validators.py +154 -94
- glaip_sdk/config/constants.py +0 -2
- glaip_sdk/models.py +5 -4
- glaip_sdk/utils/__init__.py +7 -7
- glaip_sdk/utils/client_utils.py +191 -101
- glaip_sdk/utils/display.py +4 -2
- glaip_sdk/utils/general.py +8 -6
- glaip_sdk/utils/import_export.py +58 -25
- glaip_sdk/utils/rendering/formatting.py +12 -6
- glaip_sdk/utils/rendering/models.py +1 -1
- glaip_sdk/utils/rendering/renderer/base.py +523 -332
- glaip_sdk/utils/rendering/renderer/console.py +6 -5
- glaip_sdk/utils/rendering/renderer/debug.py +94 -52
- glaip_sdk/utils/rendering/renderer/stream.py +93 -48
- glaip_sdk/utils/rendering/steps.py +103 -39
- glaip_sdk/utils/rich_utils.py +1 -1
- glaip_sdk/utils/run_renderer.py +1 -1
- glaip_sdk/utils/serialization.py +9 -3
- glaip_sdk/utils/validation.py +2 -2
- glaip_sdk-0.0.7.dist-info/METADATA +183 -0
- glaip_sdk-0.0.7.dist-info/RECORD +55 -0
- glaip_sdk-0.0.5b1.dist-info/METADATA +0 -645
- glaip_sdk-0.0.5b1.dist-info/RECORD +0 -55
- {glaip_sdk-0.0.5b1.dist-info → glaip_sdk-0.0.7.dist-info}/WHEEL +0 -0
- {glaip_sdk-0.0.5b1.dist-info → glaip_sdk-0.0.7.dist-info}/entry_points.txt +0 -0
glaip_sdk/__init__.py
CHANGED
|
@@ -9,4 +9,4 @@ from glaip_sdk.client import Client
|
|
|
9
9
|
from glaip_sdk.exceptions import AIPError
|
|
10
10
|
from glaip_sdk.models import MCP, Agent, Tool
|
|
11
11
|
|
|
12
|
-
__all__ = ["
|
|
12
|
+
__all__ = ["MCP", "AIPError", "Agent", "Client", "Tool", "__version__"]
|
glaip_sdk/_version.py
CHANGED
|
@@ -24,28 +24,51 @@ except Exception: # pragma: no cover
|
|
|
24
24
|
_toml = None # type: ignore
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def
|
|
27
|
+
def _try_get_installed_version() -> str | None:
|
|
28
|
+
"""Try to get version from installed package."""
|
|
28
29
|
try:
|
|
29
30
|
return version("glaip-sdk")
|
|
30
31
|
except PackageNotFoundError:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
return None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _try_get_dev_version() -> str | None:
|
|
36
|
+
"""Try to get version from local pyproject.toml for development."""
|
|
37
|
+
if _toml is None:
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
from pathlib import Path
|
|
42
|
+
|
|
43
|
+
here = Path(__file__).resolve()
|
|
44
|
+
root = here.parent.parent # project root (contains pyproject.toml)
|
|
45
|
+
pyproject = root / "pyproject.toml"
|
|
46
|
+
if not pyproject.is_file():
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
data = _toml.loads(pyproject.read_text(encoding="utf-8"))
|
|
50
|
+
ver = data.get("project", {}).get("version") or data.get("tool", {}).get(
|
|
51
|
+
"poetry", {}
|
|
52
|
+
).get("version")
|
|
53
|
+
if isinstance(ver, str) and ver:
|
|
54
|
+
return ver
|
|
55
|
+
except Exception:
|
|
56
|
+
pass
|
|
57
|
+
return None
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _get_version() -> str:
|
|
61
|
+
# Try installed version first
|
|
62
|
+
installed_version = _try_get_installed_version()
|
|
63
|
+
if installed_version:
|
|
64
|
+
return installed_version
|
|
65
|
+
|
|
66
|
+
# Try development version
|
|
67
|
+
dev_version = _try_get_dev_version()
|
|
68
|
+
if dev_version:
|
|
69
|
+
return dev_version
|
|
70
|
+
|
|
71
|
+
return "0.0.0.dev0"
|
|
49
72
|
|
|
50
73
|
|
|
51
74
|
__version__ = _get_version()
|
glaip_sdk/branding.py
CHANGED
|
@@ -18,6 +18,7 @@ import sys
|
|
|
18
18
|
|
|
19
19
|
from rich.console import Console
|
|
20
20
|
|
|
21
|
+
from glaip_sdk._version import __version__ as SDK_VERSION
|
|
21
22
|
from glaip_sdk.rich_components import AIPPanel
|
|
22
23
|
|
|
23
24
|
try:
|
|
@@ -54,7 +55,7 @@ GDP Labs AI Agents Package
|
|
|
54
55
|
self,
|
|
55
56
|
version: str | None = None,
|
|
56
57
|
package_name: str | None = None,
|
|
57
|
-
):
|
|
58
|
+
) -> None:
|
|
58
59
|
"""
|
|
59
60
|
Args:
|
|
60
61
|
version: Explicit SDK version (overrides auto-detection).
|
|
@@ -75,7 +76,7 @@ GDP Labs AI Agents Package
|
|
|
75
76
|
return pkg_version(package_name)
|
|
76
77
|
except PackageNotFoundError:
|
|
77
78
|
pass
|
|
78
|
-
return
|
|
79
|
+
return SDK_VERSION
|
|
79
80
|
|
|
80
81
|
@staticmethod
|
|
81
82
|
def _make_console() -> Console:
|