glaip-sdk 0.1.3__py3-none-any.whl → 0.1.4__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.
@@ -11,7 +11,6 @@ from rich.console import Console
11
11
  from rich.text import Text
12
12
 
13
13
  from glaip_sdk import Client
14
- from glaip_sdk._version import __version__ as _SDK_VERSION
15
14
  from glaip_sdk.branding import (
16
15
  ACCENT_STYLE,
17
16
  ERROR_STYLE,
@@ -24,7 +23,7 @@ from glaip_sdk.branding import (
24
23
  )
25
24
  from glaip_sdk.cli.config import CONFIG_FILE, load_config, save_config
26
25
  from glaip_sdk.cli.rich_helpers import markup_text
27
- from glaip_sdk.cli.utils import command_hint, format_command_hint
26
+ from glaip_sdk.cli.utils import command_hint, format_command_hint, sdk_version
28
27
  from glaip_sdk.icons import ICON_TOOL
29
28
  from glaip_sdk.rich_components import AIPTable
30
29
 
@@ -196,7 +195,7 @@ def _render_config_table(config: dict[str, str]) -> None:
196
195
 
197
196
 
198
197
  def _render_configuration_header() -> None:
199
- branding = AIPBranding.create_from_sdk(sdk_version=_SDK_VERSION, package_name="glaip-sdk")
198
+ branding = AIPBranding.create_from_sdk(sdk_version=sdk_version(), package_name="glaip-sdk")
200
199
  heading = "[bold]>_ GDP Labs AI Agents Package (AIP CLI)[/bold]"
201
200
  console.print(heading)
202
201
  console.print()
glaip_sdk/cli/main.py CHANGED
@@ -13,7 +13,6 @@ import click
13
13
  from rich.console import Console
14
14
 
15
15
  from glaip_sdk import Client
16
- from glaip_sdk._version import __version__ as _SDK_VERSION
17
16
  from glaip_sdk.branding import (
18
17
  ERROR,
19
18
  ERROR_STYLE,
@@ -38,7 +37,7 @@ from glaip_sdk.cli.commands.update import update_command
38
37
  from glaip_sdk.cli.config import load_config
39
38
  from glaip_sdk.cli.transcript import get_transcript_cache_stats
40
39
  from glaip_sdk.cli.update_notifier import maybe_notify_update
41
- from glaip_sdk.cli.utils import in_slash_mode, spinner_context, update_spinner
40
+ from glaip_sdk.cli.utils import in_slash_mode, sdk_version, spinner_context, update_spinner
42
41
  from glaip_sdk.config.constants import (
43
42
  DEFAULT_AGENT_RUN_TIMEOUT,
44
43
  )
@@ -75,7 +74,7 @@ def _format_size(num: int) -> str:
75
74
 
76
75
 
77
76
  @click.group(invoke_without_command=True)
78
- @click.version_option(version=_SDK_VERSION, prog_name="aip")
77
+ @click.version_option(package_name="glaip-sdk", prog_name="aip")
79
78
  @click.option(
80
79
  "--api-url",
81
80
  envvar="AIP_API_URL",
@@ -136,7 +135,7 @@ def main(
136
135
  if not ctx.resilient_parsing and ctx.obj["tty"] and not launching_slash:
137
136
  console = Console()
138
137
  maybe_notify_update(
139
- _SDK_VERSION,
138
+ sdk_version(),
140
139
  console=console,
141
140
  ctx=ctx,
142
141
  slash_command="update",
@@ -215,7 +214,7 @@ def _validate_config_and_show_error(config: dict, console: Console) -> None:
215
214
  border_style=ERROR,
216
215
  )
217
216
  )
218
- console.print(f"\n[{SUCCESS_STYLE}]✅ AIP - Ready[/] (SDK v{_SDK_VERSION}) - Configure to connect")
217
+ console.print(f"\n[{SUCCESS_STYLE}]✅ AIP - Ready[/] (SDK v{sdk_version()}) - Configure to connect")
219
218
  sys.exit(1)
220
219
 
221
220
 
@@ -233,7 +232,7 @@ def _render_status_heading(console: Console, slash_mode: bool) -> None:
233
232
  del slash_mode # heading now consistent across invocation contexts
234
233
  console.print(f"[{INFO_STYLE}]GL AIP status[/]")
235
234
  console.print()
236
- console.print(f"[{SUCCESS_STYLE}]✅ GL AIP ready[/] (SDK v{_SDK_VERSION})")
235
+ console.print(f"[{SUCCESS_STYLE}]✅ GL AIP ready[/] (SDK v{sdk_version()})")
237
236
 
238
237
 
239
238
  def _collect_cache_summary() -> tuple[str | None, str | None]:
@@ -391,7 +390,7 @@ def status(ctx: Any) -> None:
391
390
  @main.command()
392
391
  def version() -> None:
393
392
  """Show version information."""
394
- branding = AIPBranding.create_from_sdk(sdk_version=_SDK_VERSION, package_name="glaip-sdk")
393
+ branding = AIPBranding.create_from_sdk(sdk_version=sdk_version(), package_name="glaip-sdk")
395
394
  branding.display_version_panel()
396
395
 
397
396
 
glaip_sdk/cli/utils.py CHANGED
@@ -21,6 +21,7 @@ from rich.console import Console, Group
21
21
  from rich.markdown import Markdown
22
22
  from rich.pretty import Pretty
23
23
 
24
+ from glaip_sdk import _version as _version_module
24
25
  from glaip_sdk.branding import (
25
26
  ACCENT_STYLE,
26
27
  HINT_COMMAND_STYLE,
@@ -74,6 +75,8 @@ from glaip_sdk.utils.rendering.renderer import (
74
75
  console = Console()
75
76
  pager.console = console
76
77
  logger = logging.getLogger("glaip_sdk.cli.utils")
78
+ _version_logger = logging.getLogger("glaip_sdk.cli.version")
79
+ _WARNED_SDK_VERSION_FALLBACK = False
77
80
 
78
81
 
79
82
  # ----------------------------- Context helpers ---------------------------- #
@@ -151,6 +154,20 @@ def format_command_hint(
151
154
  return highlighted
152
155
 
153
156
 
157
+ def sdk_version() -> str:
158
+ """Return the current SDK version, warning if metadata is unavailable."""
159
+ version = getattr(_version_module, "__version__", None)
160
+ if isinstance(version, str) and version:
161
+ return version
162
+
163
+ global _WARNED_SDK_VERSION_FALLBACK
164
+ if not _WARNED_SDK_VERSION_FALLBACK:
165
+ _version_logger.warning("Unable to resolve glaip-sdk version metadata; using fallback '0.0.0'.")
166
+ _WARNED_SDK_VERSION_FALLBACK = True
167
+
168
+ return "0.0.0"
169
+
170
+
154
171
  def spinner_context(
155
172
  ctx: Any | None,
156
173
  message: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: glaip-sdk
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Python SDK for GL AIP (GDP Labs AI Agent Package) - Simplified CLI Design
5
5
  License: MIT
6
6
  Author: Raymond Christopher
@@ -6,7 +6,7 @@ glaip_sdk/cli/agent_config.py,sha256=YAbFKrTNTRqNA6b0i0Q3pH-01rhHDRi5v8dxSFwGSwM
6
6
  glaip_sdk/cli/auth.py,sha256=oZLgZTqVgx_o2ppcp1ueFwuu88acOUPUr9ed1WDe_HY,15860
7
7
  glaip_sdk/cli/commands/__init__.py,sha256=N2go38u3C0MPxfDXk-K2zz93OnqSTpQyOE6dIC82lHg,191
8
8
  glaip_sdk/cli/commands/agents.py,sha256=t80p_olOL4htn8VZJSBizj5ajeKomVaeN72iP1fk72I,43897
9
- glaip_sdk/cli/commands/configure.py,sha256=7dmMSs-rMRETtpWgUDEGeNedSJl04yrp6VCRiLEpBUI,9074
9
+ glaip_sdk/cli/commands/configure.py,sha256=xBOvT5FkfAxPMoaT8we9gltY5jjcIs1j0w33OH8Gk-A,9029
10
10
  glaip_sdk/cli/commands/mcps.py,sha256=oYzL52gUImi5x5mx8grbWkTwUTpAp7VoYGalOzEyLqU,37465
11
11
  glaip_sdk/cli/commands/models.py,sha256=CQrjIwVeZED6AQXJ321UVB8IvmGrEjOIWrtlgDBu6HI,1775
12
12
  glaip_sdk/cli/commands/tools.py,sha256=5y0ec1K1sNvLv0MwvEY0ggb5xiU2k2O2FsWL6k9NDxI,19102
@@ -15,7 +15,7 @@ glaip_sdk/cli/config.py,sha256=sZLG0wPlLegl71g_J4PZxWb46wCZJgtEQQ5ppsr45CU,1297
15
15
  glaip_sdk/cli/context.py,sha256=M4weRf8dmp5bMtPLRF3w1StnRB7Lo8FPFq2GQMv3Rv8,3617
16
16
  glaip_sdk/cli/display.py,sha256=AIB81s85ejMg-nM-CIAQ5s3pmVDo6oNykUW680rluJw,11385
17
17
  glaip_sdk/cli/io.py,sha256=_7qHA3K4VfzNXP7NYHShby_Bw9xigJ26oIaESXYDAQ8,3678
18
- glaip_sdk/cli/main.py,sha256=ESxVe_m5NDXPUc9XMHhgneH4MtBVOZpxdwPyYDtNz64,17110
18
+ glaip_sdk/cli/main.py,sha256=JFhFFxTx2gkC2Pjm5oJpDviG1dYCKaUsTYrOM_fTG00,17072
19
19
  glaip_sdk/cli/masking.py,sha256=BOZjwUqxQf3LQlYgUMwq7UYgve8x4_1Qk04ixiJJPZ8,4399
20
20
  glaip_sdk/cli/mcp_validators.py,sha256=cwbz7p_p7_9xVuuF96OBQOdmEgo5UObU6iWWQ2X03PI,10047
21
21
  glaip_sdk/cli/pager.py,sha256=Cp1t47ViCUW3T3IkHdRBF2yNOrVLrnIBIemTxBso17Q,8049
@@ -34,7 +34,7 @@ glaip_sdk/cli/transcript/export.py,sha256=reCvrZVzli8_LzYe5ZNdaa-MwZ1ov2RjnDzKZW
34
34
  glaip_sdk/cli/transcript/launcher.py,sha256=z5ivkPXDQJpATIqtRLUK8jH3p3WIZ72PvOPqYRDMJvw,2327
35
35
  glaip_sdk/cli/transcript/viewer.py,sha256=dsEPki92XuVICneXZSfVq73rED_ryjxpu4_mY40qgwM,28030
36
36
  glaip_sdk/cli/update_notifier.py,sha256=4h3F7q2DoMGyJSp8tu5NJHt8yeCVBOL-3A0ZyHyvRpw,9532
37
- glaip_sdk/cli/utils.py,sha256=HxZfkauGNl0YfQe43zOHEi1pR9mis_2jVCcCjLchIHA,40589
37
+ glaip_sdk/cli/utils.py,sha256=P-gpIfwiMe5h5nkXaQXawo8gqscajVm5GVqPWTtAj0U,41222
38
38
  glaip_sdk/cli/validators.py,sha256=Squ2W-fMz9kfvhtTt7pCcAYnzFU28ZxxTEqH1vF9r00,5620
39
39
  glaip_sdk/client/__init__.py,sha256=nYLXfBVTTWwKjP0e63iumPYO4k5FifwWaELQPaPIKIg,188
40
40
  glaip_sdk/client/_agent_payloads.py,sha256=QjaSqXZvDNX0bQVKC7Eb5nHj7KxhU0zLSfNUQiKf2J8,16269
@@ -77,7 +77,7 @@ glaip_sdk/utils/resource_refs.py,sha256=OpwJxTCKq3RIqLAmKE0xspJplD4IhKqLCo0OqPaf
77
77
  glaip_sdk/utils/run_renderer.py,sha256=d_VMI6LbvHPUUeRmGqh5wK_lHqDEIAcym2iqpbtDad0,1365
78
78
  glaip_sdk/utils/serialization.py,sha256=cvlPQ73y4jhsbJeQ6Bv7vaq0NV8uZ27p2vD_R-nyiRQ,12646
79
79
  glaip_sdk/utils/validation.py,sha256=NPDexNgGUIoLkEIz6hl3K6EG7ZKSEkcNLDElqm8-Ng4,7019
80
- glaip_sdk-0.1.3.dist-info/METADATA,sha256=xmqRfmzC1WiNwUVJgpRyfcyC2cxjvd8IxXQcgWqAMkc,6023
81
- glaip_sdk-0.1.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
82
- glaip_sdk-0.1.3.dist-info/entry_points.txt,sha256=EGs8NO8J1fdFMWA3CsF7sKBEvtHb_fujdCoNPhfMouE,47
83
- glaip_sdk-0.1.3.dist-info/RECORD,,
80
+ glaip_sdk-0.1.4.dist-info/METADATA,sha256=lNUe3-_HnPLjOtB1hlourCsQG4bnl2FpDfThEcKRJnQ,6023
81
+ glaip_sdk-0.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
82
+ glaip_sdk-0.1.4.dist-info/entry_points.txt,sha256=EGs8NO8J1fdFMWA3CsF7sKBEvtHb_fujdCoNPhfMouE,47
83
+ glaip_sdk-0.1.4.dist-info/RECORD,,