glaip-sdk 0.6.11__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.
Files changed (156) hide show
  1. glaip_sdk/__init__.py +42 -5
  2. {glaip_sdk-0.6.11.dist-info → glaip_sdk-0.6.14.dist-info}/METADATA +31 -37
  3. glaip_sdk-0.6.14.dist-info/RECORD +12 -0
  4. {glaip_sdk-0.6.11.dist-info → glaip_sdk-0.6.14.dist-info}/WHEEL +2 -1
  5. glaip_sdk-0.6.14.dist-info/entry_points.txt +2 -0
  6. glaip_sdk-0.6.14.dist-info/top_level.txt +1 -0
  7. glaip_sdk/agents/__init__.py +0 -27
  8. glaip_sdk/agents/base.py +0 -1191
  9. glaip_sdk/cli/__init__.py +0 -9
  10. glaip_sdk/cli/account_store.py +0 -540
  11. glaip_sdk/cli/agent_config.py +0 -78
  12. glaip_sdk/cli/auth.py +0 -699
  13. glaip_sdk/cli/commands/__init__.py +0 -5
  14. glaip_sdk/cli/commands/accounts.py +0 -746
  15. glaip_sdk/cli/commands/agents.py +0 -1509
  16. glaip_sdk/cli/commands/common_config.py +0 -101
  17. glaip_sdk/cli/commands/configure.py +0 -896
  18. glaip_sdk/cli/commands/mcps.py +0 -1356
  19. glaip_sdk/cli/commands/models.py +0 -69
  20. glaip_sdk/cli/commands/tools.py +0 -576
  21. glaip_sdk/cli/commands/transcripts.py +0 -755
  22. glaip_sdk/cli/commands/update.py +0 -61
  23. glaip_sdk/cli/config.py +0 -95
  24. glaip_sdk/cli/constants.py +0 -38
  25. glaip_sdk/cli/context.py +0 -150
  26. glaip_sdk/cli/core/__init__.py +0 -79
  27. glaip_sdk/cli/core/context.py +0 -124
  28. glaip_sdk/cli/core/output.py +0 -846
  29. glaip_sdk/cli/core/prompting.py +0 -649
  30. glaip_sdk/cli/core/rendering.py +0 -187
  31. glaip_sdk/cli/display.py +0 -355
  32. glaip_sdk/cli/hints.py +0 -57
  33. glaip_sdk/cli/io.py +0 -112
  34. glaip_sdk/cli/main.py +0 -604
  35. glaip_sdk/cli/masking.py +0 -136
  36. glaip_sdk/cli/mcp_validators.py +0 -287
  37. glaip_sdk/cli/pager.py +0 -266
  38. glaip_sdk/cli/parsers/__init__.py +0 -7
  39. glaip_sdk/cli/parsers/json_input.py +0 -177
  40. glaip_sdk/cli/resolution.py +0 -67
  41. glaip_sdk/cli/rich_helpers.py +0 -27
  42. glaip_sdk/cli/slash/__init__.py +0 -15
  43. glaip_sdk/cli/slash/accounts_controller.py +0 -578
  44. glaip_sdk/cli/slash/accounts_shared.py +0 -75
  45. glaip_sdk/cli/slash/agent_session.py +0 -285
  46. glaip_sdk/cli/slash/prompt.py +0 -256
  47. glaip_sdk/cli/slash/remote_runs_controller.py +0 -566
  48. glaip_sdk/cli/slash/session.py +0 -1708
  49. glaip_sdk/cli/slash/tui/__init__.py +0 -9
  50. glaip_sdk/cli/slash/tui/accounts_app.py +0 -876
  51. glaip_sdk/cli/slash/tui/background_tasks.py +0 -72
  52. glaip_sdk/cli/slash/tui/loading.py +0 -58
  53. glaip_sdk/cli/slash/tui/remote_runs_app.py +0 -628
  54. glaip_sdk/cli/transcript/__init__.py +0 -31
  55. glaip_sdk/cli/transcript/cache.py +0 -536
  56. glaip_sdk/cli/transcript/capture.py +0 -329
  57. glaip_sdk/cli/transcript/export.py +0 -38
  58. glaip_sdk/cli/transcript/history.py +0 -815
  59. glaip_sdk/cli/transcript/launcher.py +0 -77
  60. glaip_sdk/cli/transcript/viewer.py +0 -374
  61. glaip_sdk/cli/update_notifier.py +0 -290
  62. glaip_sdk/cli/utils.py +0 -263
  63. glaip_sdk/cli/validators.py +0 -238
  64. glaip_sdk/client/__init__.py +0 -11
  65. glaip_sdk/client/_agent_payloads.py +0 -520
  66. glaip_sdk/client/agent_runs.py +0 -147
  67. glaip_sdk/client/agents.py +0 -1335
  68. glaip_sdk/client/base.py +0 -502
  69. glaip_sdk/client/main.py +0 -249
  70. glaip_sdk/client/mcps.py +0 -370
  71. glaip_sdk/client/run_rendering.py +0 -700
  72. glaip_sdk/client/shared.py +0 -21
  73. glaip_sdk/client/tools.py +0 -661
  74. glaip_sdk/client/validators.py +0 -198
  75. glaip_sdk/config/constants.py +0 -52
  76. glaip_sdk/mcps/__init__.py +0 -21
  77. glaip_sdk/mcps/base.py +0 -345
  78. glaip_sdk/models/__init__.py +0 -90
  79. glaip_sdk/models/agent.py +0 -47
  80. glaip_sdk/models/agent_runs.py +0 -116
  81. glaip_sdk/models/common.py +0 -42
  82. glaip_sdk/models/mcp.py +0 -33
  83. glaip_sdk/models/tool.py +0 -33
  84. glaip_sdk/payload_schemas/__init__.py +0 -7
  85. glaip_sdk/payload_schemas/agent.py +0 -85
  86. glaip_sdk/registry/__init__.py +0 -55
  87. glaip_sdk/registry/agent.py +0 -164
  88. glaip_sdk/registry/base.py +0 -139
  89. glaip_sdk/registry/mcp.py +0 -253
  90. glaip_sdk/registry/tool.py +0 -232
  91. glaip_sdk/runner/__init__.py +0 -59
  92. glaip_sdk/runner/base.py +0 -84
  93. glaip_sdk/runner/deps.py +0 -115
  94. glaip_sdk/runner/langgraph.py +0 -782
  95. glaip_sdk/runner/mcp_adapter/__init__.py +0 -13
  96. glaip_sdk/runner/mcp_adapter/base_mcp_adapter.py +0 -43
  97. glaip_sdk/runner/mcp_adapter/langchain_mcp_adapter.py +0 -257
  98. glaip_sdk/runner/mcp_adapter/mcp_config_builder.py +0 -95
  99. glaip_sdk/runner/tool_adapter/__init__.py +0 -18
  100. glaip_sdk/runner/tool_adapter/base_tool_adapter.py +0 -44
  101. glaip_sdk/runner/tool_adapter/langchain_tool_adapter.py +0 -219
  102. glaip_sdk/tools/__init__.py +0 -22
  103. glaip_sdk/tools/base.py +0 -435
  104. glaip_sdk/utils/__init__.py +0 -86
  105. glaip_sdk/utils/a2a/__init__.py +0 -34
  106. glaip_sdk/utils/a2a/event_processor.py +0 -188
  107. glaip_sdk/utils/agent_config.py +0 -194
  108. glaip_sdk/utils/bundler.py +0 -267
  109. glaip_sdk/utils/client.py +0 -111
  110. glaip_sdk/utils/client_utils.py +0 -486
  111. glaip_sdk/utils/datetime_helpers.py +0 -58
  112. glaip_sdk/utils/discovery.py +0 -78
  113. glaip_sdk/utils/display.py +0 -135
  114. glaip_sdk/utils/export.py +0 -143
  115. glaip_sdk/utils/general.py +0 -61
  116. glaip_sdk/utils/import_export.py +0 -168
  117. glaip_sdk/utils/import_resolver.py +0 -492
  118. glaip_sdk/utils/instructions.py +0 -101
  119. glaip_sdk/utils/rendering/__init__.py +0 -115
  120. glaip_sdk/utils/rendering/formatting.py +0 -264
  121. glaip_sdk/utils/rendering/layout/__init__.py +0 -64
  122. glaip_sdk/utils/rendering/layout/panels.py +0 -156
  123. glaip_sdk/utils/rendering/layout/progress.py +0 -202
  124. glaip_sdk/utils/rendering/layout/summary.py +0 -74
  125. glaip_sdk/utils/rendering/layout/transcript.py +0 -606
  126. glaip_sdk/utils/rendering/models.py +0 -85
  127. glaip_sdk/utils/rendering/renderer/__init__.py +0 -55
  128. glaip_sdk/utils/rendering/renderer/base.py +0 -1024
  129. glaip_sdk/utils/rendering/renderer/config.py +0 -27
  130. glaip_sdk/utils/rendering/renderer/console.py +0 -55
  131. glaip_sdk/utils/rendering/renderer/debug.py +0 -178
  132. glaip_sdk/utils/rendering/renderer/factory.py +0 -138
  133. glaip_sdk/utils/rendering/renderer/stream.py +0 -202
  134. glaip_sdk/utils/rendering/renderer/summary_window.py +0 -79
  135. glaip_sdk/utils/rendering/renderer/thinking.py +0 -273
  136. glaip_sdk/utils/rendering/renderer/toggle.py +0 -182
  137. glaip_sdk/utils/rendering/renderer/tool_panels.py +0 -442
  138. glaip_sdk/utils/rendering/renderer/transcript_mode.py +0 -162
  139. glaip_sdk/utils/rendering/state.py +0 -204
  140. glaip_sdk/utils/rendering/step_tree_state.py +0 -100
  141. glaip_sdk/utils/rendering/steps/__init__.py +0 -34
  142. glaip_sdk/utils/rendering/steps/event_processor.py +0 -778
  143. glaip_sdk/utils/rendering/steps/format.py +0 -176
  144. glaip_sdk/utils/rendering/steps/manager.py +0 -387
  145. glaip_sdk/utils/rendering/timing.py +0 -36
  146. glaip_sdk/utils/rendering/viewer/__init__.py +0 -21
  147. glaip_sdk/utils/rendering/viewer/presenter.py +0 -184
  148. glaip_sdk/utils/resource_refs.py +0 -195
  149. glaip_sdk/utils/run_renderer.py +0 -41
  150. glaip_sdk/utils/runtime_config.py +0 -425
  151. glaip_sdk/utils/serialization.py +0 -424
  152. glaip_sdk/utils/sync.py +0 -142
  153. glaip_sdk/utils/tool_detection.py +0 -33
  154. glaip_sdk/utils/validation.py +0 -264
  155. glaip_sdk-0.6.11.dist-info/RECORD +0 -159
  156. glaip_sdk-0.6.11.dist-info/entry_points.txt +0 -3
glaip_sdk/runner/base.py DELETED
@@ -1,84 +0,0 @@
1
- """Abstract base class for agent execution runners.
2
-
3
- Authors:
4
- Christian Trisno Sen Long Chen (christian.t.s.l.chen@gdplabs.id)
5
- """
6
-
7
- from __future__ import annotations
8
-
9
- from abc import ABC, abstractmethod
10
- from typing import TYPE_CHECKING, Any
11
-
12
- if TYPE_CHECKING:
13
- from glaip_sdk.agents.base import Agent
14
-
15
-
16
- class BaseRunner(ABC):
17
- """Abstract base class for agent execution runners.
18
-
19
- Runners are responsible for executing glaip-sdk Agent instances
20
- and returning results. Different runner implementations may use
21
- different execution backends (LangGraph, Google ADK, etc.).
22
- """
23
-
24
- @abstractmethod
25
- def run(
26
- self,
27
- agent: Agent,
28
- message: str,
29
- verbose: bool = False,
30
- runtime_config: dict[str, Any] | None = None,
31
- chat_history: list[dict[str, str]] | None = None,
32
- **kwargs: Any,
33
- ) -> str:
34
- """Execute agent synchronously and return final response text.
35
-
36
- Args:
37
- agent: The glaip_sdk Agent to execute.
38
- message: The user message to send to the agent.
39
- verbose: If True, emit debug trace output during execution.
40
- Defaults to False.
41
- runtime_config: Optional runtime configuration for tools, MCPs, etc.
42
- Defaults to None.
43
- chat_history: Optional list of prior conversation messages.
44
- Defaults to None.
45
- **kwargs: Additional keyword arguments passed to the backend.
46
-
47
- Returns:
48
- The final response text from the agent.
49
-
50
- Raises:
51
- RuntimeError: If execution fails.
52
- """
53
- ...
54
-
55
- @abstractmethod
56
- async def arun(
57
- self,
58
- agent: Agent,
59
- message: str,
60
- verbose: bool = False,
61
- runtime_config: dict[str, Any] | None = None,
62
- chat_history: list[dict[str, str]] | None = None,
63
- **kwargs: Any,
64
- ) -> str:
65
- """Execute agent asynchronously and return final response text.
66
-
67
- Args:
68
- agent: The glaip_sdk Agent to execute.
69
- message: The user message to send to the agent.
70
- verbose: If True, emit debug trace output during execution.
71
- Defaults to False.
72
- runtime_config: Optional runtime configuration for tools, MCPs, etc.
73
- Defaults to None.
74
- chat_history: Optional list of prior conversation messages.
75
- Defaults to None.
76
- **kwargs: Additional keyword arguments passed to the backend.
77
-
78
- Returns:
79
- The final response text from the agent.
80
-
81
- Raises:
82
- RuntimeError: If execution fails.
83
- """
84
- ...
glaip_sdk/runner/deps.py DELETED
@@ -1,115 +0,0 @@
1
- """Dependency detection utilities for the runner module.
2
-
3
- This module provides helpers to detect whether the local runtime dependencies
4
- (aip-agents) are installed and to generate actionable error messages when they
5
- are not available.
6
-
7
- Authors:
8
- Christian Trisno Sen Long Chen (christian.t.s.l.chen@gdplabs.id)
9
-
10
- Example:
11
- >>> from glaip_sdk.runner.deps import check_local_runtime_available
12
- >>> if not check_local_runtime_available():
13
- ... print(get_local_runtime_missing_message())
14
- """
15
-
16
- from __future__ import annotations
17
-
18
- from gllm_core.utils import LoggerManager
19
-
20
- logger = LoggerManager().get_logger(__name__)
21
-
22
- # Module-level cache for import availability check
23
- _local_runtime_available: bool | None = None
24
-
25
-
26
- def _probe_aip_agents_import() -> bool:
27
- """Attempt to import aip_agents and return success status.
28
-
29
- Returns:
30
- True if aip_agents can be imported successfully, False otherwise.
31
- """
32
- try:
33
- import aip_agents # noqa: F401, PLC0415
34
-
35
- return True
36
- except ImportError:
37
- return False
38
-
39
-
40
- def check_local_runtime_available() -> bool:
41
- """Check if the local runtime dependencies are installed and importable.
42
-
43
- This function probes for the aip_agents module which provides the
44
- LangGraphReactAgent for local execution. Results are cached for efficiency.
45
-
46
- Returns:
47
- True if local runtime is available, False otherwise.
48
- """
49
- global _local_runtime_available
50
-
51
- if _local_runtime_available is None:
52
- _local_runtime_available = _probe_aip_agents_import()
53
- if _local_runtime_available:
54
- logger.debug("Local runtime dependencies (aip-agents) detected")
55
- else:
56
- logger.debug("Local runtime dependencies (aip-agents) not available")
57
-
58
- return _local_runtime_available
59
-
60
-
61
- # Cached availability flag for use in conditions without function call overhead
62
- LOCAL_RUNTIME_AVAILABLE: bool = check_local_runtime_available()
63
-
64
-
65
- def get_local_runtime_missing_message() -> str:
66
- """Generate an actionable error message when local runtime is not available.
67
-
68
- Returns:
69
- A user-friendly message explaining how to install local runtime dependencies
70
- or how to use server-backed execution as an alternative.
71
- """
72
- return (
73
- "Local runtime dependencies are not installed. "
74
- "To run agents locally without an AIP server, install with:\n\n"
75
- ' pip install "glaip-sdk[local]"\n\n'
76
- "Alternatively, call deploy() to run this agent on the AIP server."
77
- )
78
-
79
-
80
- def get_local_mode_not_supported_for_tool_message(tool_ref: str) -> str:
81
- """Generate an error message for tools that cannot be used in local mode.
82
-
83
- Args:
84
- tool_ref: A string identifier for the tool (name, ID, or type description).
85
-
86
- Returns:
87
- Error message explaining that the tool type is not supported locally.
88
- """
89
- return (
90
- f"Tool '{tool_ref}' cannot be used in local mode. "
91
- "Local runtime only supports LangChain-compatible tool classes/instances "
92
- "and Tool.from_langchain(...) references. "
93
- "Native platform tools (Tool.from_native()) require server-backed execution "
94
- "via deploy()."
95
- )
96
-
97
-
98
- def get_uuid_not_supported_message(key_type: str, uuid_value: str) -> str:
99
- """Generate an error message when a UUID is used in local mode.
100
-
101
- In local mode, runtime_config keys must be tool/agent/MCP objects or names,
102
- not UUIDs which require platform registry resolution.
103
-
104
- Args:
105
- key_type: The type of key (e.g., "tool", "agent", "mcp").
106
- uuid_value: The UUID that was incorrectly provided.
107
-
108
- Returns:
109
- Error message explaining that UUIDs are not supported in local mode.
110
- """
111
- return (
112
- f"UUID-like {key_type} key '{uuid_value}' is not supported in local mode. "
113
- f"Local runtime cannot resolve {key_type} IDs - pass the {key_type} "
114
- f"class/instance or name instead."
115
- )