glaip-sdk 0.6.12__py3-none-any.whl → 0.6.14__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 +42 -5
- {glaip_sdk-0.6.12.dist-info → glaip_sdk-0.6.14.dist-info}/METADATA +31 -37
- glaip_sdk-0.6.14.dist-info/RECORD +12 -0
- {glaip_sdk-0.6.12.dist-info → glaip_sdk-0.6.14.dist-info}/WHEEL +2 -1
- glaip_sdk-0.6.14.dist-info/entry_points.txt +2 -0
- glaip_sdk-0.6.14.dist-info/top_level.txt +1 -0
- glaip_sdk/agents/__init__.py +0 -27
- glaip_sdk/agents/base.py +0 -1191
- glaip_sdk/cli/__init__.py +0 -9
- glaip_sdk/cli/account_store.py +0 -540
- glaip_sdk/cli/agent_config.py +0 -78
- glaip_sdk/cli/auth.py +0 -699
- glaip_sdk/cli/commands/__init__.py +0 -5
- glaip_sdk/cli/commands/accounts.py +0 -746
- glaip_sdk/cli/commands/agents.py +0 -1509
- glaip_sdk/cli/commands/common_config.py +0 -101
- glaip_sdk/cli/commands/configure.py +0 -896
- glaip_sdk/cli/commands/mcps.py +0 -1356
- glaip_sdk/cli/commands/models.py +0 -69
- glaip_sdk/cli/commands/tools.py +0 -576
- glaip_sdk/cli/commands/transcripts.py +0 -755
- glaip_sdk/cli/commands/update.py +0 -61
- glaip_sdk/cli/config.py +0 -95
- glaip_sdk/cli/constants.py +0 -38
- glaip_sdk/cli/context.py +0 -150
- glaip_sdk/cli/core/__init__.py +0 -79
- glaip_sdk/cli/core/context.py +0 -124
- glaip_sdk/cli/core/output.py +0 -846
- glaip_sdk/cli/core/prompting.py +0 -649
- glaip_sdk/cli/core/rendering.py +0 -187
- glaip_sdk/cli/display.py +0 -355
- glaip_sdk/cli/hints.py +0 -57
- glaip_sdk/cli/io.py +0 -112
- glaip_sdk/cli/main.py +0 -604
- glaip_sdk/cli/masking.py +0 -136
- glaip_sdk/cli/mcp_validators.py +0 -287
- glaip_sdk/cli/pager.py +0 -266
- glaip_sdk/cli/parsers/__init__.py +0 -7
- glaip_sdk/cli/parsers/json_input.py +0 -177
- glaip_sdk/cli/resolution.py +0 -67
- glaip_sdk/cli/rich_helpers.py +0 -27
- glaip_sdk/cli/slash/__init__.py +0 -15
- glaip_sdk/cli/slash/accounts_controller.py +0 -578
- glaip_sdk/cli/slash/accounts_shared.py +0 -75
- glaip_sdk/cli/slash/agent_session.py +0 -285
- glaip_sdk/cli/slash/prompt.py +0 -256
- glaip_sdk/cli/slash/remote_runs_controller.py +0 -566
- glaip_sdk/cli/slash/session.py +0 -1708
- glaip_sdk/cli/slash/tui/__init__.py +0 -9
- glaip_sdk/cli/slash/tui/accounts_app.py +0 -876
- glaip_sdk/cli/slash/tui/background_tasks.py +0 -72
- glaip_sdk/cli/slash/tui/loading.py +0 -58
- glaip_sdk/cli/slash/tui/remote_runs_app.py +0 -628
- glaip_sdk/cli/transcript/__init__.py +0 -31
- glaip_sdk/cli/transcript/cache.py +0 -536
- glaip_sdk/cli/transcript/capture.py +0 -329
- glaip_sdk/cli/transcript/export.py +0 -38
- glaip_sdk/cli/transcript/history.py +0 -815
- glaip_sdk/cli/transcript/launcher.py +0 -77
- glaip_sdk/cli/transcript/viewer.py +0 -374
- glaip_sdk/cli/update_notifier.py +0 -290
- glaip_sdk/cli/utils.py +0 -263
- glaip_sdk/cli/validators.py +0 -238
- glaip_sdk/client/__init__.py +0 -11
- glaip_sdk/client/_agent_payloads.py +0 -520
- glaip_sdk/client/agent_runs.py +0 -147
- glaip_sdk/client/agents.py +0 -1335
- glaip_sdk/client/base.py +0 -502
- glaip_sdk/client/main.py +0 -249
- glaip_sdk/client/mcps.py +0 -370
- glaip_sdk/client/run_rendering.py +0 -700
- glaip_sdk/client/shared.py +0 -21
- glaip_sdk/client/tools.py +0 -661
- glaip_sdk/client/validators.py +0 -198
- glaip_sdk/config/constants.py +0 -52
- glaip_sdk/mcps/__init__.py +0 -21
- glaip_sdk/mcps/base.py +0 -345
- glaip_sdk/models/__init__.py +0 -90
- glaip_sdk/models/agent.py +0 -47
- glaip_sdk/models/agent_runs.py +0 -116
- glaip_sdk/models/common.py +0 -42
- glaip_sdk/models/mcp.py +0 -33
- glaip_sdk/models/tool.py +0 -33
- glaip_sdk/payload_schemas/__init__.py +0 -7
- glaip_sdk/payload_schemas/agent.py +0 -85
- glaip_sdk/registry/__init__.py +0 -55
- glaip_sdk/registry/agent.py +0 -164
- glaip_sdk/registry/base.py +0 -139
- glaip_sdk/registry/mcp.py +0 -253
- glaip_sdk/registry/tool.py +0 -232
- glaip_sdk/runner/__init__.py +0 -59
- glaip_sdk/runner/base.py +0 -84
- glaip_sdk/runner/deps.py +0 -115
- glaip_sdk/runner/langgraph.py +0 -782
- glaip_sdk/runner/mcp_adapter/__init__.py +0 -13
- glaip_sdk/runner/mcp_adapter/base_mcp_adapter.py +0 -43
- glaip_sdk/runner/mcp_adapter/langchain_mcp_adapter.py +0 -257
- glaip_sdk/runner/mcp_adapter/mcp_config_builder.py +0 -95
- glaip_sdk/runner/tool_adapter/__init__.py +0 -18
- glaip_sdk/runner/tool_adapter/base_tool_adapter.py +0 -44
- glaip_sdk/runner/tool_adapter/langchain_tool_adapter.py +0 -219
- glaip_sdk/tools/__init__.py +0 -22
- glaip_sdk/tools/base.py +0 -435
- glaip_sdk/utils/__init__.py +0 -86
- glaip_sdk/utils/a2a/__init__.py +0 -34
- glaip_sdk/utils/a2a/event_processor.py +0 -188
- glaip_sdk/utils/agent_config.py +0 -194
- glaip_sdk/utils/bundler.py +0 -267
- glaip_sdk/utils/client.py +0 -111
- glaip_sdk/utils/client_utils.py +0 -486
- glaip_sdk/utils/datetime_helpers.py +0 -58
- glaip_sdk/utils/discovery.py +0 -78
- glaip_sdk/utils/display.py +0 -135
- glaip_sdk/utils/export.py +0 -143
- glaip_sdk/utils/general.py +0 -61
- glaip_sdk/utils/import_export.py +0 -168
- glaip_sdk/utils/import_resolver.py +0 -492
- glaip_sdk/utils/instructions.py +0 -101
- glaip_sdk/utils/rendering/__init__.py +0 -115
- glaip_sdk/utils/rendering/formatting.py +0 -264
- glaip_sdk/utils/rendering/layout/__init__.py +0 -64
- glaip_sdk/utils/rendering/layout/panels.py +0 -156
- glaip_sdk/utils/rendering/layout/progress.py +0 -202
- glaip_sdk/utils/rendering/layout/summary.py +0 -74
- glaip_sdk/utils/rendering/layout/transcript.py +0 -606
- glaip_sdk/utils/rendering/models.py +0 -85
- glaip_sdk/utils/rendering/renderer/__init__.py +0 -55
- glaip_sdk/utils/rendering/renderer/base.py +0 -1024
- glaip_sdk/utils/rendering/renderer/config.py +0 -27
- glaip_sdk/utils/rendering/renderer/console.py +0 -55
- glaip_sdk/utils/rendering/renderer/debug.py +0 -178
- glaip_sdk/utils/rendering/renderer/factory.py +0 -138
- glaip_sdk/utils/rendering/renderer/stream.py +0 -202
- glaip_sdk/utils/rendering/renderer/summary_window.py +0 -79
- glaip_sdk/utils/rendering/renderer/thinking.py +0 -273
- glaip_sdk/utils/rendering/renderer/toggle.py +0 -182
- glaip_sdk/utils/rendering/renderer/tool_panels.py +0 -442
- glaip_sdk/utils/rendering/renderer/transcript_mode.py +0 -162
- glaip_sdk/utils/rendering/state.py +0 -204
- glaip_sdk/utils/rendering/step_tree_state.py +0 -100
- glaip_sdk/utils/rendering/steps/__init__.py +0 -34
- glaip_sdk/utils/rendering/steps/event_processor.py +0 -778
- glaip_sdk/utils/rendering/steps/format.py +0 -176
- glaip_sdk/utils/rendering/steps/manager.py +0 -387
- glaip_sdk/utils/rendering/timing.py +0 -36
- glaip_sdk/utils/rendering/viewer/__init__.py +0 -21
- glaip_sdk/utils/rendering/viewer/presenter.py +0 -184
- glaip_sdk/utils/resource_refs.py +0 -195
- glaip_sdk/utils/run_renderer.py +0 -41
- glaip_sdk/utils/runtime_config.py +0 -425
- glaip_sdk/utils/serialization.py +0 -424
- glaip_sdk/utils/sync.py +0 -142
- glaip_sdk/utils/tool_detection.py +0 -33
- glaip_sdk/utils/validation.py +0 -264
- glaip_sdk-0.6.12.dist-info/RECORD +0 -159
- glaip_sdk-0.6.12.dist-info/entry_points.txt +0 -3
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"""Shared helpers for configuration/account flows."""
|
|
2
|
-
|
|
3
|
-
import click
|
|
4
|
-
import logging
|
|
5
|
-
from rich.console import Console
|
|
6
|
-
from rich.text import Text
|
|
7
|
-
|
|
8
|
-
from glaip_sdk import Client
|
|
9
|
-
from glaip_sdk.branding import PRIMARY, SUCCESS_STYLE, WARNING_STYLE, AIPBranding
|
|
10
|
-
from glaip_sdk.cli.utils import sdk_version
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def render_branding_header(console: Console, rule_text: str) -> None:
|
|
14
|
-
"""Render the standard CLI branding header with a custom rule text."""
|
|
15
|
-
branding = AIPBranding.create_from_sdk(sdk_version=sdk_version(), package_name="glaip-sdk")
|
|
16
|
-
heading = "[bold]>_ GDP Labs AI Agents Package (AIP CLI)[/bold]"
|
|
17
|
-
console.print(heading)
|
|
18
|
-
console.print()
|
|
19
|
-
console.print(branding.get_welcome_banner())
|
|
20
|
-
console.rule(rule_text, style=PRIMARY)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def check_connection(
|
|
24
|
-
api_url: str,
|
|
25
|
-
api_key: str,
|
|
26
|
-
console: Console,
|
|
27
|
-
*,
|
|
28
|
-
abort_on_error: bool = False,
|
|
29
|
-
extra_hint: str | None = None,
|
|
30
|
-
) -> bool:
|
|
31
|
-
"""Test connectivity and report results.
|
|
32
|
-
|
|
33
|
-
Returns True on success, False on handled failures. Raises click.Abort when
|
|
34
|
-
abort_on_error is True and a fatal error occurs.
|
|
35
|
-
"""
|
|
36
|
-
console.print("\n🔌 Testing connection...")
|
|
37
|
-
client: Client | None = None
|
|
38
|
-
try:
|
|
39
|
-
# Import lazily so test patches targeting glaip_sdk.Client are honored
|
|
40
|
-
from importlib import import_module # noqa: PLC0415
|
|
41
|
-
|
|
42
|
-
client_module = import_module("glaip_sdk")
|
|
43
|
-
client = client_module.Client(api_url=api_url, api_key=api_key)
|
|
44
|
-
try:
|
|
45
|
-
agents = client.list_agents()
|
|
46
|
-
console.print(Text(f"✅ Connection successful! Found {len(agents)} agents", style=SUCCESS_STYLE))
|
|
47
|
-
return True
|
|
48
|
-
except Exception as exc: # pragma: no cover - API failures depend on network
|
|
49
|
-
console.print(Text(f"⚠️ Connection established but API call failed: {exc}", style=WARNING_STYLE))
|
|
50
|
-
console.print(" You may need to check your API permissions or network access")
|
|
51
|
-
if extra_hint:
|
|
52
|
-
console.print(extra_hint)
|
|
53
|
-
if abort_on_error:
|
|
54
|
-
raise click.Abort() from exc
|
|
55
|
-
return False
|
|
56
|
-
except Exception as exc:
|
|
57
|
-
console.print(Text(f"❌ Connection failed: {exc}"))
|
|
58
|
-
console.print(" Please check your API URL and key")
|
|
59
|
-
if extra_hint:
|
|
60
|
-
console.print(extra_hint)
|
|
61
|
-
if abort_on_error:
|
|
62
|
-
raise click.Abort() from exc
|
|
63
|
-
return False
|
|
64
|
-
finally:
|
|
65
|
-
if client is not None:
|
|
66
|
-
client.close()
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def check_connection_with_reason(
|
|
70
|
-
api_url: str,
|
|
71
|
-
api_key: str,
|
|
72
|
-
*,
|
|
73
|
-
abort_on_error: bool = False,
|
|
74
|
-
) -> tuple[bool, str]:
|
|
75
|
-
"""Test connectivity and return structured reason."""
|
|
76
|
-
client: Client | None = None
|
|
77
|
-
try:
|
|
78
|
-
# Import lazily so test patches targeting glaip_sdk.Client are honored
|
|
79
|
-
from importlib import import_module # noqa: PLC0415
|
|
80
|
-
|
|
81
|
-
client_module = import_module("glaip_sdk")
|
|
82
|
-
client = client_module.Client(api_url=api_url, api_key=api_key)
|
|
83
|
-
try:
|
|
84
|
-
client.list_agents()
|
|
85
|
-
return True, ""
|
|
86
|
-
except Exception as exc: # pragma: no cover - API failures depend on network
|
|
87
|
-
if abort_on_error:
|
|
88
|
-
raise click.Abort() from exc
|
|
89
|
-
return False, f"api_failed: {exc}"
|
|
90
|
-
except Exception as exc:
|
|
91
|
-
# Log unexpected exceptions in debug while keeping CLI-friendly messaging
|
|
92
|
-
logging.getLogger(__name__).debug("Unexpected connection error", exc_info=exc)
|
|
93
|
-
if abort_on_error:
|
|
94
|
-
raise click.Abort() from exc
|
|
95
|
-
return False, f"connection_failed: {exc}"
|
|
96
|
-
finally:
|
|
97
|
-
if client is not None:
|
|
98
|
-
try:
|
|
99
|
-
client.close()
|
|
100
|
-
except Exception:
|
|
101
|
-
pass
|