glaip-sdk 0.6.5b6__py3-none-any.whl → 0.7.12__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/agents/base.py +217 -42
- glaip_sdk/branding.py +113 -2
- glaip_sdk/cli/account_store.py +15 -0
- glaip_sdk/cli/auth.py +14 -8
- glaip_sdk/cli/commands/accounts.py +1 -1
- glaip_sdk/cli/commands/agents/__init__.py +119 -0
- glaip_sdk/cli/commands/agents/_common.py +561 -0
- glaip_sdk/cli/commands/agents/create.py +151 -0
- glaip_sdk/cli/commands/agents/delete.py +64 -0
- glaip_sdk/cli/commands/agents/get.py +89 -0
- glaip_sdk/cli/commands/agents/list.py +129 -0
- glaip_sdk/cli/commands/agents/run.py +264 -0
- glaip_sdk/cli/commands/agents/sync_langflow.py +72 -0
- glaip_sdk/cli/commands/agents/update.py +112 -0
- glaip_sdk/cli/commands/common_config.py +15 -12
- glaip_sdk/cli/commands/configure.py +2 -3
- glaip_sdk/cli/commands/mcps/__init__.py +94 -0
- glaip_sdk/cli/commands/mcps/_common.py +459 -0
- glaip_sdk/cli/commands/mcps/connect.py +82 -0
- glaip_sdk/cli/commands/mcps/create.py +152 -0
- glaip_sdk/cli/commands/mcps/delete.py +73 -0
- glaip_sdk/cli/commands/mcps/get.py +212 -0
- glaip_sdk/cli/commands/mcps/list.py +69 -0
- glaip_sdk/cli/commands/mcps/tools.py +235 -0
- glaip_sdk/cli/commands/mcps/update.py +190 -0
- glaip_sdk/cli/commands/models.py +2 -4
- glaip_sdk/cli/commands/shared/__init__.py +21 -0
- glaip_sdk/cli/commands/shared/formatters.py +91 -0
- glaip_sdk/cli/commands/tools/__init__.py +69 -0
- glaip_sdk/cli/commands/tools/_common.py +80 -0
- glaip_sdk/cli/commands/tools/create.py +228 -0
- glaip_sdk/cli/commands/tools/delete.py +61 -0
- glaip_sdk/cli/commands/tools/get.py +103 -0
- glaip_sdk/cli/commands/tools/list.py +69 -0
- glaip_sdk/cli/commands/tools/script.py +49 -0
- glaip_sdk/cli/commands/tools/update.py +102 -0
- glaip_sdk/cli/commands/transcripts/__init__.py +90 -0
- glaip_sdk/cli/commands/transcripts/_common.py +9 -0
- glaip_sdk/cli/commands/transcripts/clear.py +5 -0
- glaip_sdk/cli/commands/transcripts/detail.py +5 -0
- glaip_sdk/cli/commands/{transcripts.py → transcripts_original.py} +2 -1
- glaip_sdk/cli/commands/update.py +163 -17
- glaip_sdk/cli/config.py +1 -0
- glaip_sdk/cli/core/output.py +12 -7
- glaip_sdk/cli/entrypoint.py +20 -0
- glaip_sdk/cli/main.py +127 -39
- glaip_sdk/cli/pager.py +3 -3
- glaip_sdk/cli/resolution.py +2 -1
- glaip_sdk/cli/slash/accounts_controller.py +112 -32
- glaip_sdk/cli/slash/agent_session.py +5 -2
- glaip_sdk/cli/slash/prompt.py +11 -0
- glaip_sdk/cli/slash/remote_runs_controller.py +3 -1
- glaip_sdk/cli/slash/session.py +369 -23
- glaip_sdk/cli/slash/tui/__init__.py +26 -1
- glaip_sdk/cli/slash/tui/accounts.tcss +79 -5
- glaip_sdk/cli/slash/tui/accounts_app.py +1027 -88
- glaip_sdk/cli/slash/tui/clipboard.py +195 -0
- glaip_sdk/cli/slash/tui/context.py +87 -0
- glaip_sdk/cli/slash/tui/keybind_registry.py +235 -0
- glaip_sdk/cli/slash/tui/layouts/__init__.py +14 -0
- glaip_sdk/cli/slash/tui/layouts/harlequin.py +160 -0
- glaip_sdk/cli/slash/tui/remote_runs_app.py +119 -12
- glaip_sdk/cli/slash/tui/terminal.py +407 -0
- glaip_sdk/cli/slash/tui/theme/__init__.py +15 -0
- glaip_sdk/cli/slash/tui/theme/catalog.py +79 -0
- glaip_sdk/cli/slash/tui/theme/manager.py +112 -0
- glaip_sdk/cli/slash/tui/theme/tokens.py +55 -0
- glaip_sdk/cli/slash/tui/toast.py +374 -0
- glaip_sdk/cli/transcript/history.py +1 -1
- glaip_sdk/cli/transcript/viewer.py +5 -3
- glaip_sdk/cli/tui_settings.py +125 -0
- glaip_sdk/cli/update_notifier.py +215 -7
- glaip_sdk/cli/validators.py +1 -1
- glaip_sdk/client/__init__.py +2 -1
- glaip_sdk/client/_schedule_payloads.py +89 -0
- glaip_sdk/client/agents.py +50 -8
- glaip_sdk/client/hitl.py +136 -0
- glaip_sdk/client/main.py +7 -1
- glaip_sdk/client/mcps.py +44 -13
- glaip_sdk/client/payloads/agent/__init__.py +23 -0
- glaip_sdk/client/{_agent_payloads.py → payloads/agent/requests.py} +22 -47
- glaip_sdk/client/payloads/agent/responses.py +43 -0
- glaip_sdk/client/run_rendering.py +414 -3
- glaip_sdk/client/schedules.py +439 -0
- glaip_sdk/client/tools.py +57 -26
- glaip_sdk/guardrails/__init__.py +80 -0
- glaip_sdk/guardrails/serializer.py +89 -0
- glaip_sdk/hitl/__init__.py +48 -0
- glaip_sdk/hitl/base.py +64 -0
- glaip_sdk/hitl/callback.py +43 -0
- glaip_sdk/hitl/local.py +121 -0
- glaip_sdk/hitl/remote.py +523 -0
- glaip_sdk/models/__init__.py +17 -0
- glaip_sdk/models/agent_runs.py +2 -1
- glaip_sdk/models/schedule.py +224 -0
- glaip_sdk/payload_schemas/agent.py +1 -0
- glaip_sdk/payload_schemas/guardrails.py +34 -0
- glaip_sdk/registry/tool.py +273 -59
- glaip_sdk/runner/__init__.py +20 -3
- glaip_sdk/runner/deps.py +5 -8
- glaip_sdk/runner/langgraph.py +318 -42
- glaip_sdk/runner/logging_config.py +77 -0
- glaip_sdk/runner/mcp_adapter/langchain_mcp_adapter.py +104 -5
- glaip_sdk/runner/tool_adapter/langchain_tool_adapter.py +72 -7
- glaip_sdk/schedules/__init__.py +22 -0
- glaip_sdk/schedules/base.py +291 -0
- glaip_sdk/tools/base.py +67 -14
- glaip_sdk/utils/__init__.py +1 -0
- glaip_sdk/utils/bundler.py +138 -2
- glaip_sdk/utils/import_resolver.py +43 -11
- glaip_sdk/utils/rendering/renderer/base.py +58 -0
- glaip_sdk/utils/runtime_config.py +15 -12
- glaip_sdk/utils/sync.py +31 -11
- glaip_sdk/utils/tool_detection.py +274 -6
- glaip_sdk/utils/tool_storage_provider.py +140 -0
- {glaip_sdk-0.6.5b6.dist-info → glaip_sdk-0.7.12.dist-info}/METADATA +49 -37
- glaip_sdk-0.7.12.dist-info/RECORD +219 -0
- {glaip_sdk-0.6.5b6.dist-info → glaip_sdk-0.7.12.dist-info}/WHEEL +2 -1
- glaip_sdk-0.7.12.dist-info/entry_points.txt +2 -0
- glaip_sdk-0.7.12.dist-info/top_level.txt +1 -0
- glaip_sdk/cli/commands/agents.py +0 -1509
- glaip_sdk/cli/commands/mcps.py +0 -1356
- glaip_sdk/cli/commands/tools.py +0 -576
- glaip_sdk/cli/utils.py +0 -263
- glaip_sdk-0.6.5b6.dist-info/RECORD +0 -159
- glaip_sdk-0.6.5b6.dist-info/entry_points.txt +0 -3
glaip_sdk/cli/auth.py
CHANGED
|
@@ -19,8 +19,7 @@ from rich.console import Console
|
|
|
19
19
|
|
|
20
20
|
from glaip_sdk.branding import HINT_PREFIX_STYLE, WARNING_STYLE
|
|
21
21
|
from glaip_sdk.cli.account_store import AccountNotFoundError, AccountStoreError, get_account_store
|
|
22
|
-
from glaip_sdk.cli.hints import format_command_hint
|
|
23
|
-
from glaip_sdk.cli.utils import command_hint
|
|
22
|
+
from glaip_sdk.cli.hints import command_hint, format_command_hint
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
def prepare_authentication_export(
|
|
@@ -526,12 +525,19 @@ def resolve_api_url_from_context(
|
|
|
526
525
|
elif hasattr(ctx, "obj") and isinstance(ctx.obj, dict):
|
|
527
526
|
account_name = ctx.obj.get("account_name")
|
|
528
527
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
528
|
+
if isinstance(api_url, str) and api_url.strip():
|
|
529
|
+
return api_url.strip()
|
|
530
|
+
|
|
531
|
+
try:
|
|
532
|
+
resolved_url, _, _ = resolve_credentials(
|
|
533
|
+
account_name=account_name,
|
|
534
|
+
api_url=None,
|
|
535
|
+
api_key=None,
|
|
536
|
+
ignore_env_creds=True,
|
|
537
|
+
)
|
|
538
|
+
except Exception:
|
|
539
|
+
return None
|
|
540
|
+
|
|
535
541
|
return resolved_url
|
|
536
542
|
|
|
537
543
|
|
|
@@ -33,7 +33,7 @@ from glaip_sdk.cli.commands.common_config import check_connection, render_brandi
|
|
|
33
33
|
from glaip_sdk.cli.hints import format_command_hint
|
|
34
34
|
from glaip_sdk.cli.masking import mask_api_key_display
|
|
35
35
|
from glaip_sdk.cli.slash.accounts_shared import env_credentials_present
|
|
36
|
-
from glaip_sdk.cli.
|
|
36
|
+
from glaip_sdk.cli.hints import command_hint
|
|
37
37
|
from glaip_sdk.icons import ICON_TOOL
|
|
38
38
|
from glaip_sdk.rich_components import AIPPanel, AIPTable
|
|
39
39
|
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"""Agent CLI commands package.
|
|
2
|
+
|
|
3
|
+
This package contains agent management commands split by operation.
|
|
4
|
+
The package is the canonical import surface.
|
|
5
|
+
|
|
6
|
+
Authors:
|
|
7
|
+
Raymond Christopher (raymond.christopher@gdplabs.id)
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
# pylint: disable=duplicate-code
|
|
11
|
+
# Import from submodules
|
|
12
|
+
from glaip_sdk.cli.commands.agents._common import ( # noqa: E402
|
|
13
|
+
AGENT_NOT_FOUND_ERROR,
|
|
14
|
+
_get_agent_for_update,
|
|
15
|
+
_resolve_agent,
|
|
16
|
+
agents_group,
|
|
17
|
+
_coerce_mapping_candidate,
|
|
18
|
+
_display_agent_details,
|
|
19
|
+
_emit_verbose_guidance,
|
|
20
|
+
_fetch_full_agent_details,
|
|
21
|
+
_get_agent_model_name,
|
|
22
|
+
_get_language_model_display_name,
|
|
23
|
+
_model_from_config,
|
|
24
|
+
_prepare_agent_output,
|
|
25
|
+
_resolve_resources_by_name,
|
|
26
|
+
console,
|
|
27
|
+
)
|
|
28
|
+
from glaip_sdk.cli.commands.agents.create import create # noqa: E402
|
|
29
|
+
from glaip_sdk.cli.commands.agents.delete import delete # noqa: E402
|
|
30
|
+
from glaip_sdk.cli.commands.agents.get import get # noqa: E402
|
|
31
|
+
from glaip_sdk.cli.commands.agents.list import list_agents # noqa: E402
|
|
32
|
+
from glaip_sdk.cli.commands.agents.run import run, _maybe_attach_transcript_toggle # noqa: E402
|
|
33
|
+
from glaip_sdk.cli.commands.agents.sync_langflow import sync_langflow # noqa: E402
|
|
34
|
+
from glaip_sdk.cli.commands.agents.update import update # noqa: E402
|
|
35
|
+
|
|
36
|
+
# Import core functions for test compatibility
|
|
37
|
+
from glaip_sdk.cli.core.context import get_client # noqa: E402
|
|
38
|
+
from glaip_sdk.cli.core.rendering import with_client_and_spinner # noqa: E402
|
|
39
|
+
|
|
40
|
+
# Import display functions for test compatibility
|
|
41
|
+
from glaip_sdk.cli.display import ( # noqa: E402
|
|
42
|
+
handle_json_output,
|
|
43
|
+
handle_rich_output,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
# Import core output functions for test compatibility
|
|
47
|
+
from glaip_sdk.cli.core.output import ( # noqa: E402
|
|
48
|
+
handle_resource_export,
|
|
49
|
+
output_list,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# Import rendering functions for test compatibility
|
|
53
|
+
from glaip_sdk.cli.core.rendering import ( # noqa: E402
|
|
54
|
+
build_renderer,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Import display functions for test compatibility
|
|
58
|
+
from glaip_sdk.cli.display import ( # noqa: E402
|
|
59
|
+
display_agent_run_suggestions,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Import rich helpers for test compatibility
|
|
63
|
+
from glaip_sdk.cli.rich_helpers import ( # noqa: E402
|
|
64
|
+
markup_text,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Import transcript functions for test compatibility
|
|
68
|
+
from glaip_sdk.cli.transcript import ( # noqa: E402
|
|
69
|
+
maybe_launch_post_run_viewer,
|
|
70
|
+
store_transcript_for_session,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# Import IO functions for test compatibility
|
|
74
|
+
from glaip_sdk.cli.io import ( # noqa: E402
|
|
75
|
+
fetch_raw_resource_details,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Import utils for test compatibility
|
|
79
|
+
from glaip_sdk.utils import ( # noqa: E402
|
|
80
|
+
is_uuid,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
__all__ = [
|
|
84
|
+
"AGENT_NOT_FOUND_ERROR",
|
|
85
|
+
"agents_group",
|
|
86
|
+
"create",
|
|
87
|
+
"delete",
|
|
88
|
+
"get",
|
|
89
|
+
"list_agents",
|
|
90
|
+
"run",
|
|
91
|
+
"sync_langflow",
|
|
92
|
+
"update",
|
|
93
|
+
"_get_agent_for_update",
|
|
94
|
+
"_resolve_agent",
|
|
95
|
+
"_coerce_mapping_candidate",
|
|
96
|
+
"_display_agent_details",
|
|
97
|
+
"_emit_verbose_guidance",
|
|
98
|
+
"_fetch_full_agent_details",
|
|
99
|
+
"_get_agent_model_name",
|
|
100
|
+
"_get_language_model_display_name",
|
|
101
|
+
"_model_from_config",
|
|
102
|
+
"_prepare_agent_output",
|
|
103
|
+
"_resolve_resources_by_name",
|
|
104
|
+
"_maybe_attach_transcript_toggle",
|
|
105
|
+
"get_client",
|
|
106
|
+
"with_client_and_spinner",
|
|
107
|
+
"console",
|
|
108
|
+
"handle_json_output",
|
|
109
|
+
"handle_rich_output",
|
|
110
|
+
"output_list",
|
|
111
|
+
"handle_resource_export",
|
|
112
|
+
"build_renderer",
|
|
113
|
+
"display_agent_run_suggestions",
|
|
114
|
+
"markup_text",
|
|
115
|
+
"maybe_launch_post_run_viewer",
|
|
116
|
+
"store_transcript_for_session",
|
|
117
|
+
"fetch_raw_resource_details",
|
|
118
|
+
"is_uuid",
|
|
119
|
+
]
|