glaip-sdk 0.6.19__py3-none-any.whl → 0.6.21__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/cli/commands/update.py +147 -16
- glaip_sdk/cli/main.py +70 -14
- glaip_sdk/cli/update_notifier.py +81 -1
- {glaip_sdk-0.6.19.dist-info → glaip_sdk-0.6.21.dist-info}/METADATA +16 -5
- {glaip_sdk-0.6.19.dist-info → glaip_sdk-0.6.21.dist-info}/RECORD +8 -8
- {glaip_sdk-0.6.19.dist-info → glaip_sdk-0.6.21.dist-info}/WHEEL +0 -0
- {glaip_sdk-0.6.19.dist-info → glaip_sdk-0.6.21.dist-info}/entry_points.txt +0 -0
- {glaip_sdk-0.6.19.dist-info → glaip_sdk-0.6.21.dist-info}/top_level.txt +0 -0
glaip_sdk/cli/commands/update.py
CHANGED
|
@@ -6,9 +6,12 @@ Author:
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
+
import importlib.util
|
|
10
|
+
import os
|
|
9
11
|
import subprocess
|
|
10
12
|
import sys
|
|
11
13
|
from collections.abc import Sequence
|
|
14
|
+
from pathlib import Path
|
|
12
15
|
|
|
13
16
|
import click
|
|
14
17
|
from rich.console import Console
|
|
@@ -18,19 +21,132 @@ from glaip_sdk.branding import ACCENT_STYLE, ERROR_STYLE, INFO_STYLE, SUCCESS_ST
|
|
|
18
21
|
PACKAGE_NAME = "glaip-sdk"
|
|
19
22
|
|
|
20
23
|
|
|
21
|
-
def
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
def _is_uv_managed_environment() -> bool:
|
|
25
|
+
"""Check if running in a uv-managed tool environment.
|
|
26
|
+
|
|
27
|
+
Uses a path-based heuristic against sys.executable, sys.prefix, and UV_TOOL_DIR
|
|
28
|
+
or UV_TOOL_BIN to detect a case-insensitive "uv/tools" segment. Update if uv
|
|
29
|
+
changes its layout.
|
|
30
|
+
"""
|
|
31
|
+
if _has_uv_tool_path(sys.executable):
|
|
32
|
+
return True
|
|
33
|
+
if _has_uv_tool_path(sys.prefix):
|
|
34
|
+
return True
|
|
35
|
+
uv_tool_dir = os.environ.get("UV_TOOL_DIR") or os.environ.get("UV_TOOL_BIN")
|
|
36
|
+
if uv_tool_dir and _has_uv_tool_path(uv_tool_dir):
|
|
37
|
+
return True
|
|
38
|
+
return False
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _has_uv_tool_path(path: str) -> bool:
|
|
42
|
+
"""Return True when a path contains a case-insensitive uv/tools segment."""
|
|
43
|
+
parts = [part.lower() for part in Path(path).parts]
|
|
44
|
+
for idx, part in enumerate(parts[:-1]):
|
|
45
|
+
if part == "uv" and parts[idx + 1] == "tools":
|
|
46
|
+
return True
|
|
47
|
+
return False
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _is_pip_available() -> bool:
|
|
51
|
+
"""Return True when pip can be imported in the current interpreter."""
|
|
52
|
+
return importlib.util.find_spec("pip") is not None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _build_missing_pip_guidance(
|
|
56
|
+
*,
|
|
57
|
+
include_prerelease: bool,
|
|
58
|
+
package_name: str = PACKAGE_NAME,
|
|
59
|
+
force_reinstall: bool = False,
|
|
60
|
+
) -> tuple[str, str]:
|
|
61
|
+
"""Return error and troubleshooting guidance when pip is unavailable."""
|
|
62
|
+
manual_cmd = _build_manual_upgrade_command(
|
|
63
|
+
include_prerelease,
|
|
64
|
+
package_name=package_name,
|
|
65
|
+
is_uv=True,
|
|
66
|
+
force_reinstall=force_reinstall,
|
|
67
|
+
)
|
|
68
|
+
error_detail = "pip is not available in this environment."
|
|
69
|
+
troubleshooting = (
|
|
70
|
+
"💡 Troubleshooting:\n"
|
|
71
|
+
f" • If you installed via uv tool, run: {manual_cmd}\n"
|
|
72
|
+
" • Otherwise install pip: python -m ensurepip"
|
|
73
|
+
)
|
|
74
|
+
return error_detail, troubleshooting
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _build_command_parts(
|
|
78
|
+
*,
|
|
79
|
+
package_name: str = PACKAGE_NAME,
|
|
80
|
+
is_uv: bool | None = None,
|
|
81
|
+
force_reinstall: bool = False,
|
|
82
|
+
include_prerelease: bool = False,
|
|
83
|
+
) -> tuple[list[str], str]:
|
|
84
|
+
"""Build the common parts of upgrade commands.
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
Tuple of (command parts list, force_reinstall flag name).
|
|
88
|
+
For uv: (["uv", "tool", "install", "--upgrade", package_name], "--reinstall")
|
|
89
|
+
For pip: (["pip", "install", "--upgrade", package_name], "--force-reinstall")
|
|
90
|
+
"""
|
|
91
|
+
if is_uv is None:
|
|
92
|
+
is_uv = _is_uv_managed_environment()
|
|
93
|
+
|
|
94
|
+
if is_uv:
|
|
95
|
+
command = ["uv", "tool", "install", "--upgrade", package_name]
|
|
96
|
+
reinstall_flag = "--reinstall"
|
|
97
|
+
else:
|
|
98
|
+
command = ["pip", "install", "--upgrade", package_name]
|
|
99
|
+
reinstall_flag = "--force-reinstall"
|
|
100
|
+
|
|
101
|
+
if force_reinstall:
|
|
102
|
+
command.insert(-1, reinstall_flag)
|
|
103
|
+
|
|
31
104
|
if include_prerelease:
|
|
32
105
|
command.append("--pre")
|
|
33
|
-
|
|
106
|
+
|
|
107
|
+
return command, reinstall_flag
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _build_upgrade_command(
|
|
111
|
+
include_prerelease: bool,
|
|
112
|
+
*,
|
|
113
|
+
package_name: str = PACKAGE_NAME,
|
|
114
|
+
is_uv: bool | None = None,
|
|
115
|
+
force_reinstall: bool = False,
|
|
116
|
+
) -> Sequence[str]:
|
|
117
|
+
"""Return the command used to upgrade the SDK (pip or uv tool install)."""
|
|
118
|
+
if is_uv is None:
|
|
119
|
+
is_uv = _is_uv_managed_environment()
|
|
120
|
+
|
|
121
|
+
command_parts, _ = _build_command_parts(
|
|
122
|
+
package_name=package_name,
|
|
123
|
+
is_uv=is_uv,
|
|
124
|
+
force_reinstall=force_reinstall,
|
|
125
|
+
include_prerelease=include_prerelease,
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
# For pip, prepend sys.executable and -m
|
|
129
|
+
if not is_uv:
|
|
130
|
+
command_parts = [sys.executable, "-m"] + command_parts
|
|
131
|
+
|
|
132
|
+
return command_parts
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def _build_manual_upgrade_command(
|
|
136
|
+
include_prerelease: bool,
|
|
137
|
+
*,
|
|
138
|
+
package_name: str = PACKAGE_NAME,
|
|
139
|
+
is_uv: bool | None = None,
|
|
140
|
+
force_reinstall: bool = False,
|
|
141
|
+
) -> str:
|
|
142
|
+
"""Return a manual upgrade command string matching the active environment."""
|
|
143
|
+
command_parts, _ = _build_command_parts(
|
|
144
|
+
package_name=package_name,
|
|
145
|
+
is_uv=is_uv,
|
|
146
|
+
force_reinstall=force_reinstall,
|
|
147
|
+
include_prerelease=include_prerelease,
|
|
148
|
+
)
|
|
149
|
+
return " ".join(command_parts)
|
|
34
150
|
|
|
35
151
|
|
|
36
152
|
@click.command(name="update")
|
|
@@ -41,21 +157,36 @@ def _build_upgrade_command(include_prerelease: bool) -> Sequence[str]:
|
|
|
41
157
|
help="Include pre-release versions when upgrading.",
|
|
42
158
|
)
|
|
43
159
|
def update_command(include_prerelease: bool) -> None:
|
|
44
|
-
"""Upgrade the glaip-sdk package using pip."""
|
|
160
|
+
"""Upgrade the glaip-sdk package using pip or uv tool install."""
|
|
45
161
|
console = Console()
|
|
46
|
-
|
|
162
|
+
# Call _is_uv_managed_environment() once and pass explicitly to avoid redundant calls
|
|
163
|
+
is_uv = _is_uv_managed_environment()
|
|
164
|
+
if not is_uv and not _is_pip_available():
|
|
165
|
+
error_detail, troubleshooting = _build_missing_pip_guidance(
|
|
166
|
+
include_prerelease=include_prerelease,
|
|
167
|
+
)
|
|
168
|
+
raise click.ClickException(f"{error_detail}\n{troubleshooting}")
|
|
169
|
+
upgrade_cmd = _build_upgrade_command(include_prerelease, is_uv=is_uv)
|
|
170
|
+
|
|
171
|
+
# Determine the appropriate manual command for error messages
|
|
172
|
+
manual_cmd = _build_manual_upgrade_command(include_prerelease, is_uv=is_uv)
|
|
173
|
+
|
|
47
174
|
console.print(f"[{ACCENT_STYLE}]Upgrading {PACKAGE_NAME} using[/] [{INFO_STYLE}]{' '.join(upgrade_cmd)}[/]")
|
|
48
175
|
|
|
49
176
|
try:
|
|
50
177
|
subprocess.run(upgrade_cmd, check=True)
|
|
51
178
|
except FileNotFoundError as exc:
|
|
179
|
+
if is_uv:
|
|
180
|
+
raise click.ClickException(
|
|
181
|
+
f"Unable to locate uv executable. Please ensure uv is installed and on your PATH.\n"
|
|
182
|
+
f"Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh\n"
|
|
183
|
+
f"Or run manually: {manual_cmd}"
|
|
184
|
+
) from exc
|
|
52
185
|
raise click.ClickException(
|
|
53
186
|
"Unable to locate Python executable to run pip. Please ensure Python is installed and try again."
|
|
54
187
|
) from exc
|
|
55
188
|
except subprocess.CalledProcessError as exc:
|
|
56
|
-
console.print(
|
|
57
|
-
f"[{ERROR_STYLE}]Automatic upgrade failed.[/] Please run `pip install -U {PACKAGE_NAME}` manually."
|
|
58
|
-
)
|
|
189
|
+
console.print(f"[{ERROR_STYLE}]Automatic upgrade failed.[/] Please run `{manual_cmd}` manually.")
|
|
59
190
|
raise click.ClickException("Automatic upgrade failed.") from exc
|
|
60
191
|
|
|
61
192
|
console.print(f"[{SUCCESS_STYLE}]✅ {PACKAGE_NAME} upgraded successfully.[/]")
|
glaip_sdk/cli/main.py
CHANGED
|
@@ -35,7 +35,14 @@ from glaip_sdk.cli.commands.mcps import mcps_group
|
|
|
35
35
|
from glaip_sdk.cli.commands.models import models_group
|
|
36
36
|
from glaip_sdk.cli.commands.tools import tools_group
|
|
37
37
|
from glaip_sdk.cli.commands.transcripts import transcripts_group
|
|
38
|
-
from glaip_sdk.cli.commands.update import
|
|
38
|
+
from glaip_sdk.cli.commands.update import (
|
|
39
|
+
_build_missing_pip_guidance,
|
|
40
|
+
_build_manual_upgrade_command,
|
|
41
|
+
_build_upgrade_command,
|
|
42
|
+
_is_pip_available,
|
|
43
|
+
_is_uv_managed_environment,
|
|
44
|
+
update_command,
|
|
45
|
+
)
|
|
39
46
|
from glaip_sdk.cli.config import load_config
|
|
40
47
|
from glaip_sdk.cli.hints import in_slash_mode
|
|
41
48
|
from glaip_sdk.cli.transcript import get_transcript_cache_stats
|
|
@@ -47,6 +54,9 @@ from glaip_sdk.config.constants import (
|
|
|
47
54
|
from glaip_sdk.icons import ICON_AGENT
|
|
48
55
|
from glaip_sdk.rich_components import AIPPanel, AIPTable
|
|
49
56
|
|
|
57
|
+
# Constants
|
|
58
|
+
UPDATE_ERROR_TITLE = "❌ Update Error"
|
|
59
|
+
|
|
50
60
|
Client: type[Any] | None = None
|
|
51
61
|
|
|
52
62
|
|
|
@@ -549,13 +559,39 @@ def update(check_only: bool, force: bool) -> None:
|
|
|
549
559
|
),
|
|
550
560
|
)
|
|
551
561
|
|
|
552
|
-
# Update using pip
|
|
562
|
+
# Update using pip or uv tool install
|
|
553
563
|
try:
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
564
|
+
is_uv = _is_uv_managed_environment()
|
|
565
|
+
if not is_uv and not _is_pip_available():
|
|
566
|
+
error_detail, troubleshooting = _build_missing_pip_guidance(
|
|
567
|
+
include_prerelease=False,
|
|
568
|
+
package_name="glaip-sdk",
|
|
569
|
+
force_reinstall=force,
|
|
570
|
+
)
|
|
571
|
+
console.print(
|
|
572
|
+
AIPPanel(
|
|
573
|
+
f"[{ERROR_STYLE}]❌ Update failed[/]\n\n🔍 Error: {error_detail}\n\n{troubleshooting}",
|
|
574
|
+
title=UPDATE_ERROR_TITLE,
|
|
575
|
+
border_style=ERROR,
|
|
576
|
+
padding=(0, 1),
|
|
577
|
+
),
|
|
578
|
+
)
|
|
579
|
+
sys.exit(1)
|
|
580
|
+
cmd = list(
|
|
581
|
+
_build_upgrade_command(
|
|
582
|
+
include_prerelease=False,
|
|
583
|
+
package_name="glaip-sdk",
|
|
584
|
+
is_uv=is_uv,
|
|
585
|
+
force_reinstall=force,
|
|
586
|
+
)
|
|
587
|
+
)
|
|
588
|
+
|
|
589
|
+
manual_cmd = _build_manual_upgrade_command(
|
|
590
|
+
include_prerelease=False,
|
|
591
|
+
package_name="glaip-sdk",
|
|
592
|
+
is_uv=is_uv,
|
|
593
|
+
force_reinstall=force,
|
|
594
|
+
)
|
|
559
595
|
subprocess.run(cmd, capture_output=True, text=True, check=True)
|
|
560
596
|
|
|
561
597
|
verify_hint = ""
|
|
@@ -582,16 +618,36 @@ def update(check_only: bool, force: bool) -> None:
|
|
|
582
618
|
)
|
|
583
619
|
console.print(f"📋 New version: {version_result.stdout.strip()}")
|
|
584
620
|
|
|
621
|
+
except FileNotFoundError:
|
|
622
|
+
troubleshooting = f"💡 Troubleshooting:\n • Try running: {manual_cmd}\n"
|
|
623
|
+
if is_uv:
|
|
624
|
+
troubleshooting += " • Ensure uv is installed: curl -LsSf https://astral.sh/uv/install.sh | sh"
|
|
625
|
+
error_detail = "uv executable not found in your PATH."
|
|
626
|
+
else:
|
|
627
|
+
troubleshooting += " • Ensure Python and pip are installed"
|
|
628
|
+
error_detail = "Python executable not found to run pip."
|
|
629
|
+
console.print(
|
|
630
|
+
AIPPanel(
|
|
631
|
+
f"[{ERROR_STYLE}]❌ Update failed[/]\n\n🔍 Error: {error_detail}\n\n{troubleshooting}",
|
|
632
|
+
title=UPDATE_ERROR_TITLE,
|
|
633
|
+
border_style=ERROR,
|
|
634
|
+
padding=(0, 1),
|
|
635
|
+
),
|
|
636
|
+
)
|
|
637
|
+
sys.exit(1)
|
|
585
638
|
except subprocess.CalledProcessError as e:
|
|
639
|
+
troubleshooting = (
|
|
640
|
+
f"💡 Troubleshooting:\n • Check your internet connection\n • Try running: {manual_cmd}\n"
|
|
641
|
+
)
|
|
642
|
+
if is_uv:
|
|
643
|
+
troubleshooting += " • Ensure uv is installed: curl -LsSf https://astral.sh/uv/install.sh | sh"
|
|
644
|
+
else:
|
|
645
|
+
troubleshooting += " • Check if you have write permissions"
|
|
646
|
+
|
|
586
647
|
console.print(
|
|
587
648
|
AIPPanel(
|
|
588
|
-
f"[{ERROR_STYLE}]❌ Update failed[/]\n\n"
|
|
589
|
-
|
|
590
|
-
"💡 Troubleshooting:\n"
|
|
591
|
-
" • Check your internet connection\n"
|
|
592
|
-
" • Try running: pip install --upgrade glaip-sdk\n"
|
|
593
|
-
" • Check if you have write permissions",
|
|
594
|
-
title="❌ Update Error",
|
|
649
|
+
f"[{ERROR_STYLE}]❌ Update failed[/]\n\n🔍 Error: {e.stderr}\n\n{troubleshooting}",
|
|
650
|
+
title=UPDATE_ERROR_TITLE,
|
|
595
651
|
border_style=ERROR,
|
|
596
652
|
padding=(0, 1),
|
|
597
653
|
),
|
glaip_sdk/cli/update_notifier.py
CHANGED
|
@@ -22,10 +22,17 @@ from rich.console import Console
|
|
|
22
22
|
from glaip_sdk.branding import (
|
|
23
23
|
ACCENT_STYLE,
|
|
24
24
|
ERROR_STYLE,
|
|
25
|
+
INFO_STYLE,
|
|
25
26
|
SUCCESS_STYLE,
|
|
26
27
|
WARNING_STYLE,
|
|
27
28
|
)
|
|
28
|
-
from glaip_sdk.cli.commands.update import
|
|
29
|
+
from glaip_sdk.cli.commands.update import (
|
|
30
|
+
PACKAGE_NAME,
|
|
31
|
+
_build_command_parts,
|
|
32
|
+
_build_manual_upgrade_command,
|
|
33
|
+
_is_uv_managed_environment,
|
|
34
|
+
update_command,
|
|
35
|
+
)
|
|
29
36
|
from glaip_sdk.cli.constants import UPDATE_CHECK_ENABLED
|
|
30
37
|
from glaip_sdk.cli.hints import format_command_hint
|
|
31
38
|
from glaip_sdk.cli.utils import command_hint
|
|
@@ -214,17 +221,90 @@ def _prompt_update_decision(console: Console) -> Literal["update", "skip"]:
|
|
|
214
221
|
console.print(f"[{ERROR_STYLE}]Please enter 1 to update now or 2 to skip.[/]")
|
|
215
222
|
|
|
216
223
|
|
|
224
|
+
def _get_manual_upgrade_command(is_uv: bool) -> str:
|
|
225
|
+
"""Get the manual upgrade command for the given environment type.
|
|
226
|
+
|
|
227
|
+
Args:
|
|
228
|
+
is_uv: True if running in uv tool environment, False for pip environment.
|
|
229
|
+
|
|
230
|
+
Returns:
|
|
231
|
+
Manual upgrade command string.
|
|
232
|
+
"""
|
|
233
|
+
try:
|
|
234
|
+
return _build_manual_upgrade_command(include_prerelease=False, is_uv=is_uv)
|
|
235
|
+
except Exception:
|
|
236
|
+
# Fallback: rebuild from shared command parts to avoid hardcoded strings.
|
|
237
|
+
try:
|
|
238
|
+
command_parts, _ = _build_command_parts(
|
|
239
|
+
package_name=PACKAGE_NAME,
|
|
240
|
+
is_uv=is_uv,
|
|
241
|
+
force_reinstall=False,
|
|
242
|
+
include_prerelease=False,
|
|
243
|
+
)
|
|
244
|
+
except Exception:
|
|
245
|
+
command_parts = (
|
|
246
|
+
["uv", "tool", "install", "--upgrade", PACKAGE_NAME]
|
|
247
|
+
if is_uv
|
|
248
|
+
else ["pip", "install", "--upgrade", PACKAGE_NAME]
|
|
249
|
+
)
|
|
250
|
+
return " ".join(command_parts)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def _show_proactive_uv_guidance(console: Console, is_uv: bool) -> None:
|
|
254
|
+
"""Show proactive guidance for uv environments before update attempt.
|
|
255
|
+
|
|
256
|
+
Args:
|
|
257
|
+
console: Rich console for output.
|
|
258
|
+
is_uv: True if running in uv tool environment.
|
|
259
|
+
"""
|
|
260
|
+
if not is_uv:
|
|
261
|
+
return
|
|
262
|
+
|
|
263
|
+
manual_cmd = _get_manual_upgrade_command(is_uv=True)
|
|
264
|
+
console.print(
|
|
265
|
+
f"[{INFO_STYLE}]💡 Detected uv tool environment.[/] "
|
|
266
|
+
f"If automatic update fails, run: [{ACCENT_STYLE}]{manual_cmd}[/]"
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _show_error_guidance(console: Console, is_uv: bool) -> None:
|
|
271
|
+
"""Show error guidance with correct manual command based on environment.
|
|
272
|
+
|
|
273
|
+
Args:
|
|
274
|
+
console: Rich console for output.
|
|
275
|
+
is_uv: True if running in uv tool environment.
|
|
276
|
+
"""
|
|
277
|
+
try:
|
|
278
|
+
manual_cmd = _get_manual_upgrade_command(is_uv=is_uv)
|
|
279
|
+
console.print(f"[{INFO_STYLE}]💡 Tip:[/] Run this command manually:\n [{ACCENT_STYLE}]{manual_cmd}[/]")
|
|
280
|
+
except Exception as exc: # pragma: no cover - defensive guard
|
|
281
|
+
_LOGGER.debug("Failed to render update tip: %s", exc, exc_info=True)
|
|
282
|
+
|
|
283
|
+
|
|
217
284
|
def _run_update_command(console: Console, ctx: Any) -> None:
|
|
218
285
|
"""Invoke the built-in update command and surface any errors."""
|
|
286
|
+
# Detect uv environment proactively before attempting update
|
|
287
|
+
is_uv = _is_uv_managed_environment()
|
|
288
|
+
|
|
289
|
+
# Provide proactive guidance for uv environments
|
|
290
|
+
# This helps users on older versions (e.g., 0.6.19) that don't have uv detection
|
|
291
|
+
# in their update command
|
|
292
|
+
_show_proactive_uv_guidance(console, is_uv)
|
|
293
|
+
|
|
219
294
|
try:
|
|
220
295
|
ctx.invoke(update_command)
|
|
221
296
|
except click.ClickException as exc:
|
|
222
297
|
exc.show()
|
|
223
298
|
console.print(f"[{ERROR_STYLE}]Update command exited with an error.[/]")
|
|
299
|
+
_show_error_guidance(console, is_uv)
|
|
224
300
|
except click.Abort:
|
|
225
301
|
console.print(f"[{WARNING_STYLE}]Update aborted by user.[/]")
|
|
226
302
|
except Exception as exc: # pragma: no cover - defensive guard
|
|
227
303
|
console.print(f"[{ERROR_STYLE}]Unexpected error while running update: {exc}[/]")
|
|
304
|
+
# Also provide guidance for unexpected errors in uv environments
|
|
305
|
+
if is_uv:
|
|
306
|
+
manual_cmd = _get_manual_upgrade_command(is_uv=True)
|
|
307
|
+
console.print(f"[{INFO_STYLE}]💡 Tip:[/] Try running manually:\n [{ACCENT_STYLE}]{manual_cmd}[/]")
|
|
228
308
|
else:
|
|
229
309
|
_refresh_installed_version(console, ctx)
|
|
230
310
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: glaip-sdk
|
|
3
|
-
Version: 0.6.
|
|
4
|
-
Summary: Python SDK for GL AIP (GDP Labs AI Agent Package) -
|
|
3
|
+
Version: 0.6.21
|
|
4
|
+
Summary: Python SDK and CLI for GL AIP (GDP Labs AI Agent Package) - Build, run, and manage AI agents
|
|
5
5
|
Author-email: Raymond Christopher <raymond.christopher@gdplabs.id>
|
|
6
6
|
License: MIT
|
|
7
7
|
Requires-Python: <3.13,>=3.11
|
|
@@ -20,12 +20,12 @@ Requires-Dist: gllm-core-binary>=0.1.0
|
|
|
20
20
|
Requires-Dist: langchain-core>=0.3.0
|
|
21
21
|
Requires-Dist: gllm-tools-binary>=0.1.3
|
|
22
22
|
Provides-Extra: local
|
|
23
|
-
Requires-Dist: aip-agents-binary[local]>=0.5.
|
|
23
|
+
Requires-Dist: aip-agents-binary[local]>=0.5.16; (python_version >= "3.11" and python_version < "3.13") and extra == "local"
|
|
24
24
|
Requires-Dist: wrapt>=1.17.0; (python_version >= "3.11" and python_version < "3.13") and extra == "local"
|
|
25
25
|
Provides-Extra: memory
|
|
26
|
-
Requires-Dist: aip-agents-binary[memory]>=0.5.
|
|
26
|
+
Requires-Dist: aip-agents-binary[memory]>=0.5.16; (python_version >= "3.11" and python_version < "3.13") and extra == "memory"
|
|
27
27
|
Provides-Extra: privacy
|
|
28
|
-
Requires-Dist: aip-agents-binary[privacy]>=0.5.
|
|
28
|
+
Requires-Dist: aip-agents-binary[privacy]>=0.5.16; (python_version >= "3.11" and python_version < "3.13") and extra == "privacy"
|
|
29
29
|
Requires-Dist: en-core-web-sm; extra == "privacy"
|
|
30
30
|
Provides-Extra: dev
|
|
31
31
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
@@ -50,16 +50,27 @@ GL stands for **GDP Labs**—GL AIP is our AI Agents Package for building, runni
|
|
|
50
50
|
|
|
51
51
|
### Installation
|
|
52
52
|
|
|
53
|
+
Installing `glaip-sdk` provides both the **Python SDK** and the **`aip` CLI command** in a single package.
|
|
54
|
+
|
|
53
55
|
```bash
|
|
54
56
|
# Using pip (recommended)
|
|
55
57
|
pip install --upgrade glaip-sdk
|
|
56
58
|
|
|
57
59
|
# Using uv (fast alternative)
|
|
58
60
|
uv tool install glaip-sdk
|
|
61
|
+
|
|
62
|
+
# Using pipx (CLI-focused, isolated environment)
|
|
63
|
+
pipx install glaip-sdk
|
|
59
64
|
```
|
|
60
65
|
|
|
61
66
|
**Requirements**: Python 3.11 or 3.12
|
|
62
67
|
|
|
68
|
+
**Updating**: The `aip` CLI automatically detects your installation method and uses the correct update command:
|
|
69
|
+
|
|
70
|
+
- If installed via `pip`: Uses `pip install --upgrade glaip-sdk`
|
|
71
|
+
- If installed via `uv tool install`: Uses `uv tool install --upgrade glaip-sdk`
|
|
72
|
+
- You can also update manually using the same command you used to install
|
|
73
|
+
|
|
63
74
|
## 🐍 Hello World - Python SDK
|
|
64
75
|
|
|
65
76
|
Perfect for building applications and integrations.
|
|
@@ -16,13 +16,13 @@ glaip_sdk/cli/context.py,sha256=--Y5vc6lgoAV7cRoUAr9UxSQaLmkMg29FolA7EwoRqM,3803
|
|
|
16
16
|
glaip_sdk/cli/display.py,sha256=ojgWdGeD5KUnGOmWNqqK4JP-1EaWHWX--DWze3BmIz0,12137
|
|
17
17
|
glaip_sdk/cli/hints.py,sha256=ca4krG103IS43s5BSLr0-N7uRMpte1_LY4nAXVvgDxo,1596
|
|
18
18
|
glaip_sdk/cli/io.py,sha256=ChP6CRKbtuENsNomNEaMDfPDU0iqO-WuVvl4_y7F2io,3871
|
|
19
|
-
glaip_sdk/cli/main.py,sha256=
|
|
19
|
+
glaip_sdk/cli/main.py,sha256=NRmFZTPayDJGZMHy2TF9BXj2CQWpTEfg2SWj_4zSdUc,24047
|
|
20
20
|
glaip_sdk/cli/masking.py,sha256=2lrXQ-pfL7N-vNEQRT1s4Xq3JPDPDT8RC61OdaTtkkc,4060
|
|
21
21
|
glaip_sdk/cli/mcp_validators.py,sha256=cwbz7p_p7_9xVuuF96OBQOdmEgo5UObU6iWWQ2X03PI,10047
|
|
22
22
|
glaip_sdk/cli/pager.py,sha256=XygkAB6UW3bte7I4KmK7-PUGCJiq2Pv-4-MfyXAmXCw,7925
|
|
23
23
|
glaip_sdk/cli/resolution.py,sha256=K-VaEHm9SYY_qfb9538VNHykL4_2N6F8iQqI1zMx_64,2402
|
|
24
24
|
glaip_sdk/cli/rich_helpers.py,sha256=kO47N8e506rxrN6Oc9mbAWN3Qb536oQPWZy1s9A616g,819
|
|
25
|
-
glaip_sdk/cli/update_notifier.py,sha256=
|
|
25
|
+
glaip_sdk/cli/update_notifier.py,sha256=XtAZbIpO-h0bHUNHN0a4rvnt0mn4ckOX3dwOejN8chs,12929
|
|
26
26
|
glaip_sdk/cli/utils.py,sha256=iemmKkpPndoZFBasoVqV7QArplchtr08yYWLA2efMzg,11996
|
|
27
27
|
glaip_sdk/cli/validators.py,sha256=d-kq4y7HWMo6Gc7wLXWUsCt8JwFvJX_roZqRm1Nko1I,5622
|
|
28
28
|
glaip_sdk/cli/commands/__init__.py,sha256=6Z3ASXDut0lAbUX_umBFtxPzzFyqoiZfVeTahThFu1A,219
|
|
@@ -34,7 +34,7 @@ glaip_sdk/cli/commands/mcps.py,sha256=tttqQnfM89iI9Pm94u8YRhiHMQNYNouecFX0brsT4c
|
|
|
34
34
|
glaip_sdk/cli/commands/models.py,sha256=vfcGprK5CHprQ0CNpNzQlNNTELvdgKC7JxTG_ijOwmE,2009
|
|
35
35
|
glaip_sdk/cli/commands/tools.py,sha256=_VBqG-vIjnn-gqvDlSTvcU7_F4N3ANGGKEECcQVR-BM,18430
|
|
36
36
|
glaip_sdk/cli/commands/transcripts.py,sha256=ofxZLus1xLB061NxrLo1J6LPEb2VIxJTjmz7hLKgPmc,26377
|
|
37
|
-
glaip_sdk/cli/commands/update.py,sha256=
|
|
37
|
+
glaip_sdk/cli/commands/update.py,sha256=SMO_Hr9WEolqvpFhEXY3TboBLHBfXIvBvwovbONEs7Y,6329
|
|
38
38
|
glaip_sdk/cli/core/__init__.py,sha256=HTQqpijKNts6bYnwY97rpP3J324phoQmGFi6OXqi0E4,2116
|
|
39
39
|
glaip_sdk/cli/core/context.py,sha256=I22z5IhZ09g5FPtMycDGU9Aj20Qv3TOQLhA5enaU2qk,3970
|
|
40
40
|
glaip_sdk/cli/core/output.py,sha256=hj5F1M_rEqr4CChmdyW1QzGiWL0Mwzf-BFw-d6pjhjY,28304
|
|
@@ -156,8 +156,8 @@ glaip_sdk/utils/rendering/steps/format.py,sha256=Chnq7OBaj8XMeBntSBxrX5zSmrYeGcO
|
|
|
156
156
|
glaip_sdk/utils/rendering/steps/manager.py,sha256=BiBmTeQMQhjRMykgICXsXNYh1hGsss-fH9BIGVMWFi0,13194
|
|
157
157
|
glaip_sdk/utils/rendering/viewer/__init__.py,sha256=XrxmE2cMAozqrzo1jtDFm8HqNtvDcYi2mAhXLXn5CjI,457
|
|
158
158
|
glaip_sdk/utils/rendering/viewer/presenter.py,sha256=mlLMTjnyeyPVtsyrAbz1BJu9lFGQSlS-voZ-_Cuugv0,5725
|
|
159
|
-
glaip_sdk-0.6.
|
|
160
|
-
glaip_sdk-0.6.
|
|
161
|
-
glaip_sdk-0.6.
|
|
162
|
-
glaip_sdk-0.6.
|
|
163
|
-
glaip_sdk-0.6.
|
|
159
|
+
glaip_sdk-0.6.21.dist-info/METADATA,sha256=67DVFObOYjE67Eq16lYSj-qVo7OOq89SWbb7FdXYDbw,8455
|
|
160
|
+
glaip_sdk-0.6.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
161
|
+
glaip_sdk-0.6.21.dist-info/entry_points.txt,sha256=65vNPUggyYnVGhuw7RhNJ8Fp2jygTcX0yxJBcBY3iLU,48
|
|
162
|
+
glaip_sdk-0.6.21.dist-info/top_level.txt,sha256=td7yXttiYX2s94-4wFhv-5KdT0rSZ-pnJRSire341hw,10
|
|
163
|
+
glaip_sdk-0.6.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|