glaip-sdk 0.0.20__py3-none-any.whl → 0.7.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 +44 -4
- glaip_sdk/_version.py +10 -3
- glaip_sdk/agents/__init__.py +27 -0
- glaip_sdk/agents/base.py +1250 -0
- glaip_sdk/branding.py +15 -6
- glaip_sdk/cli/account_store.py +540 -0
- glaip_sdk/cli/agent_config.py +2 -6
- glaip_sdk/cli/auth.py +271 -45
- glaip_sdk/cli/commands/__init__.py +2 -2
- glaip_sdk/cli/commands/accounts.py +746 -0
- 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 +104 -0
- glaip_sdk/cli/commands/configure.py +734 -143
- 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 +14 -12
- 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_original.py +756 -0
- glaip_sdk/cli/commands/update.py +164 -23
- glaip_sdk/cli/config.py +49 -7
- glaip_sdk/cli/constants.py +38 -0
- glaip_sdk/cli/context.py +8 -0
- glaip_sdk/cli/core/__init__.py +79 -0
- glaip_sdk/cli/core/context.py +124 -0
- glaip_sdk/cli/core/output.py +851 -0
- glaip_sdk/cli/core/prompting.py +649 -0
- glaip_sdk/cli/core/rendering.py +187 -0
- glaip_sdk/cli/display.py +45 -32
- glaip_sdk/cli/entrypoint.py +20 -0
- glaip_sdk/cli/hints.py +57 -0
- glaip_sdk/cli/io.py +14 -17
- glaip_sdk/cli/main.py +344 -167
- glaip_sdk/cli/masking.py +21 -33
- glaip_sdk/cli/mcp_validators.py +5 -15
- glaip_sdk/cli/pager.py +15 -22
- glaip_sdk/cli/parsers/__init__.py +1 -3
- glaip_sdk/cli/parsers/json_input.py +11 -22
- glaip_sdk/cli/resolution.py +5 -10
- glaip_sdk/cli/rich_helpers.py +1 -3
- glaip_sdk/cli/slash/__init__.py +0 -9
- glaip_sdk/cli/slash/accounts_controller.py +580 -0
- glaip_sdk/cli/slash/accounts_shared.py +75 -0
- glaip_sdk/cli/slash/agent_session.py +65 -29
- glaip_sdk/cli/slash/prompt.py +24 -10
- glaip_sdk/cli/slash/remote_runs_controller.py +566 -0
- glaip_sdk/cli/slash/session.py +827 -232
- glaip_sdk/cli/slash/tui/__init__.py +34 -0
- glaip_sdk/cli/slash/tui/accounts.tcss +88 -0
- glaip_sdk/cli/slash/tui/accounts_app.py +933 -0
- glaip_sdk/cli/slash/tui/background_tasks.py +72 -0
- glaip_sdk/cli/slash/tui/clipboard.py +147 -0
- glaip_sdk/cli/slash/tui/context.py +59 -0
- glaip_sdk/cli/slash/tui/keybind_registry.py +235 -0
- glaip_sdk/cli/slash/tui/loading.py +58 -0
- glaip_sdk/cli/slash/tui/remote_runs_app.py +628 -0
- glaip_sdk/cli/slash/tui/terminal.py +402 -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 +86 -0
- glaip_sdk/cli/slash/tui/theme/tokens.py +55 -0
- glaip_sdk/cli/slash/tui/toast.py +123 -0
- glaip_sdk/cli/transcript/__init__.py +12 -52
- glaip_sdk/cli/transcript/cache.py +258 -60
- glaip_sdk/cli/transcript/capture.py +72 -21
- glaip_sdk/cli/transcript/history.py +815 -0
- glaip_sdk/cli/transcript/launcher.py +1 -3
- glaip_sdk/cli/transcript/viewer.py +79 -329
- glaip_sdk/cli/update_notifier.py +385 -24
- glaip_sdk/cli/validators.py +16 -18
- glaip_sdk/client/__init__.py +3 -1
- glaip_sdk/client/_schedule_payloads.py +89 -0
- glaip_sdk/client/agent_runs.py +147 -0
- glaip_sdk/client/agents.py +370 -100
- glaip_sdk/client/base.py +78 -35
- glaip_sdk/client/hitl.py +136 -0
- glaip_sdk/client/main.py +25 -10
- glaip_sdk/client/mcps.py +166 -27
- glaip_sdk/client/payloads/agent/__init__.py +23 -0
- glaip_sdk/client/{_agent_payloads.py → payloads/agent/requests.py} +65 -74
- glaip_sdk/client/payloads/agent/responses.py +43 -0
- glaip_sdk/client/run_rendering.py +583 -79
- glaip_sdk/client/schedules.py +439 -0
- glaip_sdk/client/shared.py +21 -0
- glaip_sdk/client/tools.py +214 -56
- glaip_sdk/client/validators.py +20 -48
- glaip_sdk/config/constants.py +11 -0
- glaip_sdk/exceptions.py +1 -3
- 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/icons.py +9 -3
- glaip_sdk/mcps/__init__.py +21 -0
- glaip_sdk/mcps/base.py +345 -0
- glaip_sdk/models/__init__.py +107 -0
- glaip_sdk/models/agent.py +47 -0
- glaip_sdk/models/agent_runs.py +117 -0
- glaip_sdk/models/common.py +42 -0
- glaip_sdk/models/mcp.py +33 -0
- glaip_sdk/models/schedule.py +224 -0
- glaip_sdk/models/tool.py +33 -0
- glaip_sdk/payload_schemas/__init__.py +1 -13
- glaip_sdk/payload_schemas/agent.py +1 -3
- glaip_sdk/registry/__init__.py +55 -0
- glaip_sdk/registry/agent.py +164 -0
- glaip_sdk/registry/base.py +139 -0
- glaip_sdk/registry/mcp.py +253 -0
- glaip_sdk/registry/tool.py +445 -0
- glaip_sdk/rich_components.py +58 -2
- glaip_sdk/runner/__init__.py +76 -0
- glaip_sdk/runner/base.py +84 -0
- glaip_sdk/runner/deps.py +112 -0
- glaip_sdk/runner/langgraph.py +872 -0
- glaip_sdk/runner/logging_config.py +77 -0
- glaip_sdk/runner/mcp_adapter/__init__.py +13 -0
- glaip_sdk/runner/mcp_adapter/base_mcp_adapter.py +43 -0
- glaip_sdk/runner/mcp_adapter/langchain_mcp_adapter.py +257 -0
- glaip_sdk/runner/mcp_adapter/mcp_config_builder.py +95 -0
- glaip_sdk/runner/tool_adapter/__init__.py +18 -0
- glaip_sdk/runner/tool_adapter/base_tool_adapter.py +44 -0
- glaip_sdk/runner/tool_adapter/langchain_tool_adapter.py +242 -0
- glaip_sdk/schedules/__init__.py +22 -0
- glaip_sdk/schedules/base.py +291 -0
- glaip_sdk/tools/__init__.py +22 -0
- glaip_sdk/tools/base.py +468 -0
- glaip_sdk/utils/__init__.py +59 -12
- glaip_sdk/utils/a2a/__init__.py +34 -0
- glaip_sdk/utils/a2a/event_processor.py +188 -0
- glaip_sdk/utils/agent_config.py +4 -14
- glaip_sdk/utils/bundler.py +403 -0
- glaip_sdk/utils/client.py +111 -0
- glaip_sdk/utils/client_utils.py +46 -28
- glaip_sdk/utils/datetime_helpers.py +58 -0
- glaip_sdk/utils/discovery.py +78 -0
- glaip_sdk/utils/display.py +25 -21
- glaip_sdk/utils/export.py +143 -0
- glaip_sdk/utils/general.py +1 -36
- glaip_sdk/utils/import_export.py +15 -16
- glaip_sdk/utils/import_resolver.py +524 -0
- glaip_sdk/utils/instructions.py +101 -0
- glaip_sdk/utils/rendering/__init__.py +115 -1
- glaip_sdk/utils/rendering/formatting.py +38 -23
- glaip_sdk/utils/rendering/layout/__init__.py +64 -0
- glaip_sdk/utils/rendering/{renderer → layout}/panels.py +10 -3
- glaip_sdk/utils/rendering/{renderer → layout}/progress.py +73 -12
- glaip_sdk/utils/rendering/layout/summary.py +74 -0
- glaip_sdk/utils/rendering/layout/transcript.py +606 -0
- glaip_sdk/utils/rendering/models.py +18 -8
- glaip_sdk/utils/rendering/renderer/__init__.py +9 -51
- glaip_sdk/utils/rendering/renderer/base.py +534 -882
- glaip_sdk/utils/rendering/renderer/config.py +4 -10
- glaip_sdk/utils/rendering/renderer/debug.py +30 -34
- glaip_sdk/utils/rendering/renderer/factory.py +138 -0
- glaip_sdk/utils/rendering/renderer/stream.py +13 -54
- glaip_sdk/utils/rendering/renderer/summary_window.py +79 -0
- glaip_sdk/utils/rendering/renderer/thinking.py +273 -0
- glaip_sdk/utils/rendering/renderer/toggle.py +182 -0
- glaip_sdk/utils/rendering/renderer/tool_panels.py +442 -0
- glaip_sdk/utils/rendering/renderer/transcript_mode.py +162 -0
- glaip_sdk/utils/rendering/state.py +204 -0
- glaip_sdk/utils/rendering/step_tree_state.py +100 -0
- glaip_sdk/utils/rendering/steps/__init__.py +34 -0
- glaip_sdk/utils/rendering/steps/event_processor.py +778 -0
- glaip_sdk/utils/rendering/steps/format.py +176 -0
- glaip_sdk/utils/rendering/{steps.py → steps/manager.py} +122 -26
- glaip_sdk/utils/rendering/timing.py +36 -0
- glaip_sdk/utils/rendering/viewer/__init__.py +21 -0
- glaip_sdk/utils/rendering/viewer/presenter.py +184 -0
- glaip_sdk/utils/resource_refs.py +29 -26
- glaip_sdk/utils/runtime_config.py +425 -0
- glaip_sdk/utils/serialization.py +32 -46
- glaip_sdk/utils/sync.py +162 -0
- glaip_sdk/utils/tool_detection.py +301 -0
- glaip_sdk/utils/tool_storage_provider.py +140 -0
- glaip_sdk/utils/validation.py +20 -28
- {glaip_sdk-0.0.20.dist-info → glaip_sdk-0.7.7.dist-info}/METADATA +78 -23
- glaip_sdk-0.7.7.dist-info/RECORD +213 -0
- {glaip_sdk-0.0.20.dist-info → glaip_sdk-0.7.7.dist-info}/WHEEL +2 -1
- glaip_sdk-0.7.7.dist-info/entry_points.txt +2 -0
- glaip_sdk-0.7.7.dist-info/top_level.txt +1 -0
- glaip_sdk/cli/commands/agents.py +0 -1412
- glaip_sdk/cli/commands/mcps.py +0 -1225
- glaip_sdk/cli/commands/tools.py +0 -597
- glaip_sdk/cli/utils.py +0 -1330
- glaip_sdk/models.py +0 -259
- glaip_sdk-0.0.20.dist-info/RECORD +0 -80
- glaip_sdk-0.0.20.dist-info/entry_points.txt +0 -3
glaip_sdk/models.py
DELETED
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Data models for AIP SDK.
|
|
3
|
-
|
|
4
|
-
Authors:
|
|
5
|
-
Raymond Christopher (raymond.christopher@gdplabs.id)
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from collections.abc import AsyncGenerator
|
|
9
|
-
from datetime import datetime
|
|
10
|
-
from typing import Any
|
|
11
|
-
|
|
12
|
-
from pydantic import BaseModel
|
|
13
|
-
|
|
14
|
-
from glaip_sdk.config.constants import DEFAULT_AGENT_RUN_TIMEOUT
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class Agent(BaseModel):
|
|
18
|
-
"""Agent model for API responses."""
|
|
19
|
-
|
|
20
|
-
id: str
|
|
21
|
-
name: str
|
|
22
|
-
instruction: str | None = None
|
|
23
|
-
description: str | None = None # Add missing description field
|
|
24
|
-
type: str | None = None
|
|
25
|
-
framework: str | None = None
|
|
26
|
-
version: str | None = None
|
|
27
|
-
tools: list[dict[str, Any]] | None = None # Backend returns ToolReference objects
|
|
28
|
-
agents: list[dict[str, Any]] | None = None # Backend returns AgentReference objects
|
|
29
|
-
mcps: list[dict[str, Any]] | None = None # Backend returns MCPReference objects
|
|
30
|
-
tool_configs: dict[str, Any] | None = (
|
|
31
|
-
None # Backend returns tool configurations keyed by tool UUID
|
|
32
|
-
)
|
|
33
|
-
agent_config: dict[str, Any] | None = None
|
|
34
|
-
timeout: int = DEFAULT_AGENT_RUN_TIMEOUT
|
|
35
|
-
metadata: dict[str, Any] | None = None
|
|
36
|
-
language_model_id: str | None = None
|
|
37
|
-
a2a_profile: dict[str, Any] | None = None
|
|
38
|
-
created_at: datetime | None = None # Backend returns creation timestamp
|
|
39
|
-
updated_at: datetime | None = None # Backend returns last update timestamp
|
|
40
|
-
_client: Any = None
|
|
41
|
-
|
|
42
|
-
def _set_client(self, client: Any) -> "Agent":
|
|
43
|
-
"""Set the client reference for this resource."""
|
|
44
|
-
self._client = client
|
|
45
|
-
return self
|
|
46
|
-
|
|
47
|
-
def run(self, message: str, verbose: bool = False, **kwargs) -> str:
|
|
48
|
-
"""Run the agent with a message.
|
|
49
|
-
|
|
50
|
-
Args:
|
|
51
|
-
message: The message to send to the agent
|
|
52
|
-
verbose: Enable verbose output and event JSON logging
|
|
53
|
-
**kwargs: Additional arguments passed to run_agent
|
|
54
|
-
"""
|
|
55
|
-
if not self._client:
|
|
56
|
-
raise RuntimeError(
|
|
57
|
-
"No client available. Use client.get_agent_by_id() to get a client-connected agent."
|
|
58
|
-
)
|
|
59
|
-
# Automatically pass the agent name for better renderer display
|
|
60
|
-
kwargs.setdefault("agent_name", self.name)
|
|
61
|
-
# Pass the agent's configured timeout if not explicitly overridden
|
|
62
|
-
if "timeout" not in kwargs:
|
|
63
|
-
kwargs["timeout"] = self.timeout
|
|
64
|
-
# Pass verbose flag through to enable event JSON output
|
|
65
|
-
return self._client.run_agent(self.id, message, verbose=verbose, **kwargs)
|
|
66
|
-
|
|
67
|
-
async def arun(self, message: str, **kwargs) -> AsyncGenerator[dict, None]:
|
|
68
|
-
"""Async run the agent with a message, yielding streaming JSON chunks.
|
|
69
|
-
|
|
70
|
-
Args:
|
|
71
|
-
message: The message to send to the agent
|
|
72
|
-
**kwargs: Additional arguments passed to arun_agent
|
|
73
|
-
|
|
74
|
-
Yields:
|
|
75
|
-
Dictionary containing parsed JSON chunks from the streaming response
|
|
76
|
-
|
|
77
|
-
Raises:
|
|
78
|
-
RuntimeError: When no client is available
|
|
79
|
-
AgentTimeoutError: When agent execution times out
|
|
80
|
-
Exception: For other unexpected errors
|
|
81
|
-
"""
|
|
82
|
-
if not self._client:
|
|
83
|
-
raise RuntimeError(
|
|
84
|
-
"No client available. Use client.get_agent_by_id() to get a client-connected agent."
|
|
85
|
-
)
|
|
86
|
-
# Automatically pass the agent name for better context
|
|
87
|
-
kwargs.setdefault("agent_name", self.name)
|
|
88
|
-
# Pass the agent's configured timeout if not explicitly overridden
|
|
89
|
-
if "timeout" not in kwargs:
|
|
90
|
-
kwargs["timeout"] = self.timeout
|
|
91
|
-
|
|
92
|
-
async for chunk in self._client.arun_agent(self.id, message, **kwargs):
|
|
93
|
-
yield chunk
|
|
94
|
-
|
|
95
|
-
def update(self, **kwargs) -> "Agent":
|
|
96
|
-
"""Update agent attributes."""
|
|
97
|
-
if not self._client:
|
|
98
|
-
raise RuntimeError(
|
|
99
|
-
"No client available. Use client.get_agent_by_id() to get a client-connected agent."
|
|
100
|
-
)
|
|
101
|
-
updated_agent = self._client.update_agent(self.id, **kwargs)
|
|
102
|
-
# Update current instance with new data
|
|
103
|
-
for key, value in updated_agent.model_dump().items():
|
|
104
|
-
if hasattr(self, key):
|
|
105
|
-
setattr(self, key, value)
|
|
106
|
-
return self
|
|
107
|
-
|
|
108
|
-
def delete(self) -> None:
|
|
109
|
-
"""Delete the agent."""
|
|
110
|
-
if not self._client:
|
|
111
|
-
raise RuntimeError(
|
|
112
|
-
"No client available. Use client.get_agent_by_id() to get a client-connected agent."
|
|
113
|
-
)
|
|
114
|
-
self._client.delete_agent(self.id)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
class Tool(BaseModel):
|
|
118
|
-
"""Tool model for API responses."""
|
|
119
|
-
|
|
120
|
-
id: str
|
|
121
|
-
name: str
|
|
122
|
-
tool_type: str | None = None
|
|
123
|
-
description: str | None = None
|
|
124
|
-
framework: str | None = None
|
|
125
|
-
version: str | None = None
|
|
126
|
-
tool_script: str | None = None
|
|
127
|
-
tool_file: str | None = None
|
|
128
|
-
tags: str | list[str] | None = None
|
|
129
|
-
_client: Any = None # Will hold client reference
|
|
130
|
-
|
|
131
|
-
def _set_client(self, client: Any) -> "Tool":
|
|
132
|
-
"""Set the client reference for this resource."""
|
|
133
|
-
self._client = client
|
|
134
|
-
return self
|
|
135
|
-
|
|
136
|
-
def get_script(self) -> str:
|
|
137
|
-
"""Get the tool script content."""
|
|
138
|
-
if self.tool_script:
|
|
139
|
-
return self.tool_script
|
|
140
|
-
elif self.tool_file:
|
|
141
|
-
return f"Script content from file: {self.tool_file}"
|
|
142
|
-
else:
|
|
143
|
-
return "No script content available"
|
|
144
|
-
|
|
145
|
-
def update(self, **kwargs) -> "Tool":
|
|
146
|
-
"""Update tool attributes.
|
|
147
|
-
|
|
148
|
-
Supports both metadata updates and file uploads.
|
|
149
|
-
Pass 'file' parameter to update tool code via file upload.
|
|
150
|
-
"""
|
|
151
|
-
if not self._client:
|
|
152
|
-
raise RuntimeError(
|
|
153
|
-
"No client available. Use client.get_tool_by_id() to get a client-connected tool."
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
# Check if file upload is requested
|
|
157
|
-
if "file" in kwargs:
|
|
158
|
-
file_path = kwargs.pop("file") # Remove file from kwargs for metadata
|
|
159
|
-
updated_tool = self._client.tools.update_tool_via_file(
|
|
160
|
-
self.id, file_path, **kwargs
|
|
161
|
-
)
|
|
162
|
-
else:
|
|
163
|
-
# Regular metadata update
|
|
164
|
-
updated_tool = self._client.tools.update_tool(self.id, **kwargs)
|
|
165
|
-
|
|
166
|
-
# Update current instance with new data
|
|
167
|
-
for key, value in updated_tool.model_dump().items():
|
|
168
|
-
if hasattr(self, key):
|
|
169
|
-
setattr(self, key, value)
|
|
170
|
-
return self
|
|
171
|
-
|
|
172
|
-
def delete(self) -> None:
|
|
173
|
-
"""Delete the tool."""
|
|
174
|
-
if not self._client:
|
|
175
|
-
raise RuntimeError(
|
|
176
|
-
"No client available. Use client.get_tool_by_id() to get a client-connected tool."
|
|
177
|
-
)
|
|
178
|
-
self._client.delete_tool(self.id)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
class MCP(BaseModel):
|
|
182
|
-
"""MCP model for API responses."""
|
|
183
|
-
|
|
184
|
-
id: str
|
|
185
|
-
name: str
|
|
186
|
-
description: str | None = None
|
|
187
|
-
config: dict[str, Any] | None = None
|
|
188
|
-
transport: str | None = None # "sse" or "http"
|
|
189
|
-
authentication: dict[str, Any] | None = None
|
|
190
|
-
metadata: dict[str, Any] | None = None
|
|
191
|
-
_client: Any = None # Will hold client reference
|
|
192
|
-
|
|
193
|
-
def _set_client(self, client: Any) -> "MCP":
|
|
194
|
-
"""Set the client reference for this resource."""
|
|
195
|
-
self._client = client
|
|
196
|
-
return self
|
|
197
|
-
|
|
198
|
-
def get_tools(self) -> list[dict[str, Any]]:
|
|
199
|
-
"""Get tools available from this MCP."""
|
|
200
|
-
if not self._client:
|
|
201
|
-
raise RuntimeError(
|
|
202
|
-
"No client available. Use client.get_mcp_by_id() to get a client-connected MCP."
|
|
203
|
-
)
|
|
204
|
-
# This would delegate to the client's MCP tools endpoint
|
|
205
|
-
# For now, return empty list as placeholder
|
|
206
|
-
return []
|
|
207
|
-
|
|
208
|
-
def update(self, **kwargs) -> "MCP":
|
|
209
|
-
"""Update MCP attributes."""
|
|
210
|
-
if not self._client:
|
|
211
|
-
raise RuntimeError(
|
|
212
|
-
"No client available. Use client.get_mcp_by_id() to get a client-connected MCP."
|
|
213
|
-
)
|
|
214
|
-
updated_mcp = self._client.update_mcp(self.id, **kwargs)
|
|
215
|
-
# Update current instance with new data
|
|
216
|
-
for key, value in updated_mcp.model_dump().items():
|
|
217
|
-
if hasattr(self, key):
|
|
218
|
-
setattr(self, key, value)
|
|
219
|
-
return self
|
|
220
|
-
|
|
221
|
-
def delete(self) -> None:
|
|
222
|
-
"""Delete the MCP."""
|
|
223
|
-
if not self._client:
|
|
224
|
-
raise RuntimeError(
|
|
225
|
-
"No client available. Use client.get_mcp_by_id() to get a client-connected MCP."
|
|
226
|
-
)
|
|
227
|
-
self._client.delete_mcp(self.id)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
class LanguageModelResponse(BaseModel):
|
|
231
|
-
"""Language model response model."""
|
|
232
|
-
|
|
233
|
-
name: str
|
|
234
|
-
provider: str
|
|
235
|
-
description: str | None = None
|
|
236
|
-
capabilities: list[str] | None = None
|
|
237
|
-
max_tokens: int | None = None
|
|
238
|
-
supports_streaming: bool = False
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
class TTYRenderer:
|
|
242
|
-
"""Simple TTY renderer for non-Rich environments."""
|
|
243
|
-
|
|
244
|
-
def __init__(self, use_color: bool = True):
|
|
245
|
-
"""Initialize the TTY renderer.
|
|
246
|
-
|
|
247
|
-
Args:
|
|
248
|
-
use_color: Whether to use color output
|
|
249
|
-
"""
|
|
250
|
-
self.use_color = use_color
|
|
251
|
-
|
|
252
|
-
def render_message(self, message: str, event_type: str = "message") -> None:
|
|
253
|
-
"""Render a message with optional color."""
|
|
254
|
-
if event_type == "error":
|
|
255
|
-
print(f"ERROR: {message}", flush=True)
|
|
256
|
-
elif event_type == "done":
|
|
257
|
-
print(f"\n✅ {message}", flush=True)
|
|
258
|
-
else:
|
|
259
|
-
print(message, flush=True)
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
glaip_sdk/__init__.py,sha256=-Itm_1dz4QwhIUmqagvCwwvSjKYKYJI3lZSHD2bwtko,366
|
|
2
|
-
glaip_sdk/_version.py,sha256=J-UdD2Nya3c8WAXCrTRY-2bWpKGvTYY_JIaubZ4OoEw,1999
|
|
3
|
-
glaip_sdk/branding.py,sha256=BvLcD-z1D8CnYhNSGs0B1LeIrXgG1bHJ-fr4AInNhwE,7356
|
|
4
|
-
glaip_sdk/cli/__init__.py,sha256=xCCfuF1Yc7mpCDcfhHZTX0vizvtrDSLeT8MJ3V7m5A0,156
|
|
5
|
-
glaip_sdk/cli/agent_config.py,sha256=VHjebw68wAdhGUzYdPH8qz10oADZPRgUQcPW6F7iHIU,2421
|
|
6
|
-
glaip_sdk/cli/auth.py,sha256=eMqMXss3v36yyimSgm4PN8uG85UvIFn1U_XOXUvcZmI,16026
|
|
7
|
-
glaip_sdk/cli/commands/__init__.py,sha256=N2go38u3C0MPxfDXk-K2zz93OnqSTpQyOE6dIC82lHg,191
|
|
8
|
-
glaip_sdk/cli/commands/agents.py,sha256=3v9oHuPaIXFGRuoJ5jt-_hL_U8BDg4vBO2C87s7qLK8,43770
|
|
9
|
-
glaip_sdk/cli/commands/configure.py,sha256=xpryuPXzuwfCKyolxRqh-WpzxIv7sBVp7ZUjlnNrkcQ,9338
|
|
10
|
-
glaip_sdk/cli/commands/mcps.py,sha256=miZgPIyqHEgFDGcvEVr53MHODABO4UuLJyqyNytz_1g,37855
|
|
11
|
-
glaip_sdk/cli/commands/models.py,sha256=EUC-_3QPAjtqId4WobWbQZVPjgQ9Eo_srcGIRlhhPq8,1790
|
|
12
|
-
glaip_sdk/cli/commands/tools.py,sha256=rWWgzyfLp_WOMYxU1XluombLkRzWQH8WrohlWc75piU,19212
|
|
13
|
-
glaip_sdk/cli/commands/update.py,sha256=nV0C08bHDYn5byFP_N8rzdKbDc5_tDKXC19L_HftJX8,1869
|
|
14
|
-
glaip_sdk/cli/config.py,sha256=vCanx4Pv_juPX4W9O-SL658-Bq49MqyCsawPtKscpJU,1313
|
|
15
|
-
glaip_sdk/cli/context.py,sha256=M4weRf8dmp5bMtPLRF3w1StnRB7Lo8FPFq2GQMv3Rv8,3617
|
|
16
|
-
glaip_sdk/cli/display.py,sha256=0iysRFznPpkShRHp6MEc0Obao14D9k_Tx1lKoraF5f4,11273
|
|
17
|
-
glaip_sdk/cli/io.py,sha256=V8tIo0rc6t0CHGPM3cwhmlZAvzh4UPnlemUsrSFFtg8,3675
|
|
18
|
-
glaip_sdk/cli/main.py,sha256=O1q9h0LRAVxW8cwsAEXEGy6NDCchVZQHe3OXGNAGS8M,17305
|
|
19
|
-
glaip_sdk/cli/masking.py,sha256=BOZjwUqxQf3LQlYgUMwq7UYgve8x4_1Qk04ixiJJPZ8,4399
|
|
20
|
-
glaip_sdk/cli/mcp_validators.py,sha256=SeDbgXkRuBXyDtCmUMpL-1Vh7fmGldz-shAaHhOqbCc,10125
|
|
21
|
-
glaip_sdk/cli/pager.py,sha256=HZpdmgKjj367k0aZXXO9hyo38qyvWl0fUCD_VSeqJfs,8083
|
|
22
|
-
glaip_sdk/cli/parsers/__init__.py,sha256=Ycd4HDfYmA7GUGFt0ndBPBo5uTbv15XsXnYUj-a89ug,183
|
|
23
|
-
glaip_sdk/cli/parsers/json_input.py,sha256=ZBhJNUR4bKDX3A5s9lRvuCicaztvQyP0lWuiNYMIO08,5721
|
|
24
|
-
glaip_sdk/cli/resolution.py,sha256=cRkz5u8TNzjD4ybOywtisUXPKV0V-jXqKB68nRUF3O4,2465
|
|
25
|
-
glaip_sdk/cli/rich_helpers.py,sha256=ByUOmK16IisoXWE7nEiI55BF1KWDrm6KCYAxqHu0XOU,825
|
|
26
|
-
glaip_sdk/cli/slash/__init__.py,sha256=3kAXgOAnXmWkDheNtRuWqCooyIDaNYZMLTrbdhMGz9w,738
|
|
27
|
-
glaip_sdk/cli/slash/agent_session.py,sha256=Q1WUOthWMc6PglFwN_LCg60Yi51nvzPdjVdeumo_I8Y,9491
|
|
28
|
-
glaip_sdk/cli/slash/prompt.py,sha256=JBwRvIJgK0MR2Wx0wt7XAqAKpVL2Etp28ifwtklIM9M,7669
|
|
29
|
-
glaip_sdk/cli/slash/session.py,sha256=OE7WNJzN-jJIlIa_ljyJ6XwdEWIzaoCun0RAJFOhW2s,41577
|
|
30
|
-
glaip_sdk/cli/transcript/__init__.py,sha256=zQNgAETJsj2tO3OmuINgXiCQCmh_ODzI6HQPPmxMXVs,1816
|
|
31
|
-
glaip_sdk/cli/transcript/cache.py,sha256=_YGv2M-tZASljGrzbJCgiV59KmIf0w-r6Qq0bqtkZqc,9860
|
|
32
|
-
glaip_sdk/cli/transcript/capture.py,sha256=EtSac3BBYGvcZTyCe9orPvKOZKZ8ooGBOlpKlmxAg_o,8325
|
|
33
|
-
glaip_sdk/cli/transcript/export.py,sha256=reCvrZVzli8_LzYe5ZNdaa-MwZ1ov2RjnDzKZWr_6-E,1117
|
|
34
|
-
glaip_sdk/cli/transcript/launcher.py,sha256=OBaTBcNywy8NbwfdYD4IIOlksXbLT_K3poGJDP6bNyE,2333
|
|
35
|
-
glaip_sdk/cli/transcript/viewer.py,sha256=9fpxCpHdFUtj6ct5GjDCIg1b5LDogS9QI6_rnKzjpoM,21405
|
|
36
|
-
glaip_sdk/cli/update_notifier.py,sha256=Zy4VJVGI4rfYFnMQ3J2IwXLKhDZ95ODSTXgfg7gdrxU,4175
|
|
37
|
-
glaip_sdk/cli/utils.py,sha256=SoJlnmu3xgGoGGmY9pTDp6Eei31qSzgpSTDJh1WZ-nY,41050
|
|
38
|
-
glaip_sdk/cli/validators.py,sha256=USbBgY86AwuDHO-Q_g8g7hu-ot4NgITBsWjTWIl62ms,5569
|
|
39
|
-
glaip_sdk/client/__init__.py,sha256=nYLXfBVTTWwKjP0e63iumPYO4k5FifwWaELQPaPIKIg,188
|
|
40
|
-
glaip_sdk/client/_agent_payloads.py,sha256=sYlMzrfAdd8KC37qxokLy2uDd3aOhzQirnv7UYlvwYc,16385
|
|
41
|
-
glaip_sdk/client/agents.py,sha256=nGXYIAkz3jDL2glNyoROGjiAUpLwXdeqYrnc4Qxl8o0,37628
|
|
42
|
-
glaip_sdk/client/base.py,sha256=OPRlAWhZ77rUK0MRGA83-zW5NVhxJ1RgdfcfGOYr8rI,16267
|
|
43
|
-
glaip_sdk/client/main.py,sha256=tELAA36rzthnNKTgwZ6lLPb3Au8Wh1mF8Kz-9N-YtCg,8652
|
|
44
|
-
glaip_sdk/client/mcps.py,sha256=-O-I15qjbwfSA69mouHY6g5_qgPWC4rM98VJLpOkh1A,8975
|
|
45
|
-
glaip_sdk/client/run_rendering.py,sha256=WCAkVfj7FzZluBSSspWgSg37uj8tVljGjzaSy1l3Hs8,9184
|
|
46
|
-
glaip_sdk/client/tools.py,sha256=rWxfNO30sS468513IoE5PfEaqNq6HBwmcHVh4FzhvYQ,17532
|
|
47
|
-
glaip_sdk/client/validators.py,sha256=NtPsWjQLjj25LiUnmR-WuS8lL5p4MVRaYT9UVRmj9bo,8809
|
|
48
|
-
glaip_sdk/config/constants.py,sha256=B9CSlYG8LYjQuo_vNpqy-eSks3ej37FMcvJMy6d_F4U,888
|
|
49
|
-
glaip_sdk/exceptions.py,sha256=ILquxC4QGPFR9eY6RpeXzkQsblfsvZMGFqz38ZjeW3E,2345
|
|
50
|
-
glaip_sdk/icons.py,sha256=G45gnd9XA68JCi6S9e37CFxJD5sl6UeCy135JlRAU2k,358
|
|
51
|
-
glaip_sdk/models.py,sha256=uXWsC5VdXSxPci8GRYOofZrIdsFgradayrIzJyhc7u8,9188
|
|
52
|
-
glaip_sdk/payload_schemas/__init__.py,sha256=fJamlkpS3IfS9xyKAQaUbnalvrtG5Ied69OUVAA3xvs,395
|
|
53
|
-
glaip_sdk/payload_schemas/agent.py,sha256=nlizuv2w4SVzmMJSE90rE6Ll0Hfpcr5hvPsW_NtXCV0,3204
|
|
54
|
-
glaip_sdk/rich_components.py,sha256=rU3CD55WZlwjY81usctfX-S0bmsQ2Yd4nWEXhueGv7U,2090
|
|
55
|
-
glaip_sdk/utils/__init__.py,sha256=HLL4AX31lWo9gJn1dL1S-IPs2q4yPxqeHVCLJfSYyx4,892
|
|
56
|
-
glaip_sdk/utils/agent_config.py,sha256=p3uK5qC0M5uQv9uY7-U8ej11Vh81fwKAPSsYcRoNdlk,7342
|
|
57
|
-
glaip_sdk/utils/client_utils.py,sha256=OATfWztkcGlGNnrrLdM7C5eyCT7EoBD4xCLrl4rdo2w,13976
|
|
58
|
-
glaip_sdk/utils/display.py,sha256=afHuUUKs6eQrCMh16r88kNufbEtOH6WQLT9yatPP610,4027
|
|
59
|
-
glaip_sdk/utils/general.py,sha256=V5hJrIpYDvDsldU_nChHpuvV2AwhFLUI7Qvcaihq_8A,2270
|
|
60
|
-
glaip_sdk/utils/import_export.py,sha256=jEhl5U6hWWMR1wo5AXpV-_jN_56DcWcemOa2UaFHapk,5217
|
|
61
|
-
glaip_sdk/utils/rendering/__init__.py,sha256=vXjwk5rPhhfPyD8S0DnV4GFFEtPJp4HCCg1Um9SXfs0,70
|
|
62
|
-
glaip_sdk/utils/rendering/formatting.py,sha256=NY4aYkCyhn38kbbTHtxizNHxAYMRkaxqIrPeVzRgYhM,7785
|
|
63
|
-
glaip_sdk/utils/rendering/models.py,sha256=AM9JbToyA3zrAzXQYjh6oxjBkgZDfWEbs5MmNKODnOY,2259
|
|
64
|
-
glaip_sdk/utils/rendering/renderer/__init__.py,sha256=EXwVBmGkSYcype4ocAXo69Z1kXu0gpNXmhH5LW0_B7A,2939
|
|
65
|
-
glaip_sdk/utils/rendering/renderer/base.py,sha256=YgVb4vTzmrLKfvaM2TBHGS-xVDgO9JbnWDADHfZ4OAo,50650
|
|
66
|
-
glaip_sdk/utils/rendering/renderer/config.py,sha256=-P35z9JO_1ypJXAqxJ1ybHraH4i-I1LPopeW3Lh7ACE,785
|
|
67
|
-
glaip_sdk/utils/rendering/renderer/console.py,sha256=4cLOw4Q1fkHkApuj6dWW8eYpeYdcT0t2SO5MbVt5UTc,1844
|
|
68
|
-
glaip_sdk/utils/rendering/renderer/debug.py,sha256=uVaBs33mfXo44lWm4Fi5LXcrlfVmT1_Kp_IXf09RzfI,5651
|
|
69
|
-
glaip_sdk/utils/rendering/renderer/panels.py,sha256=Bv_dpUKiKlL6r0_aZ2okY7Ov7pp5-MxFjjftTWG71L4,3790
|
|
70
|
-
glaip_sdk/utils/rendering/renderer/progress.py,sha256=RnnAnw5rFd24Ij0U8Qm2oFHud8mmzDQ9Fwg3QFrRJNg,4128
|
|
71
|
-
glaip_sdk/utils/rendering/renderer/stream.py,sha256=1RP5TIV7tqg07X9gPN053XeabFGVT4jPplxaoPU0L38,8601
|
|
72
|
-
glaip_sdk/utils/rendering/steps.py,sha256=V7xFoJM_B-nWT1wMdcXGN5ytCrDTxEzKcX_YCWyJqkk,9051
|
|
73
|
-
glaip_sdk/utils/resource_refs.py,sha256=0YzblJNfRhz9xhpaKE9aE68XEV-6_ssr0fIkiMVOka0,5489
|
|
74
|
-
glaip_sdk/utils/run_renderer.py,sha256=d_VMI6LbvHPUUeRmGqh5wK_lHqDEIAcym2iqpbtDad0,1365
|
|
75
|
-
glaip_sdk/utils/serialization.py,sha256=3Bwxw2M0qR59Rx0GS0hrnWZz46Ht-gpda9dva07Pr_A,12893
|
|
76
|
-
glaip_sdk/utils/validation.py,sha256=6jv1fExRllOK6sIvU7YX3a-Sf0AlFHar4KYiTC0Pzs4,6987
|
|
77
|
-
glaip_sdk-0.0.20.dist-info/METADATA,sha256=57YytJ1dpdDIwZ6j8Yq481HEfGoY6P6J1OrMrERY20w,5164
|
|
78
|
-
glaip_sdk-0.0.20.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
79
|
-
glaip_sdk-0.0.20.dist-info/entry_points.txt,sha256=EGs8NO8J1fdFMWA3CsF7sKBEvtHb_fujdCoNPhfMouE,47
|
|
80
|
-
glaip_sdk-0.0.20.dist-info/RECORD,,
|