glaip-sdk 0.0.7__py3-none-any.whl → 0.6.5b6__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 +6 -3
- glaip_sdk/_version.py +12 -5
- glaip_sdk/agents/__init__.py +27 -0
- glaip_sdk/agents/base.py +1126 -0
- glaip_sdk/branding.py +79 -15
- glaip_sdk/cli/account_store.py +540 -0
- glaip_sdk/cli/agent_config.py +2 -6
- glaip_sdk/cli/auth.py +699 -0
- glaip_sdk/cli/commands/__init__.py +2 -2
- glaip_sdk/cli/commands/accounts.py +746 -0
- glaip_sdk/cli/commands/agents.py +503 -183
- glaip_sdk/cli/commands/common_config.py +101 -0
- glaip_sdk/cli/commands/configure.py +774 -137
- glaip_sdk/cli/commands/mcps.py +1124 -181
- glaip_sdk/cli/commands/models.py +25 -10
- glaip_sdk/cli/commands/tools.py +144 -92
- glaip_sdk/cli/commands/transcripts.py +755 -0
- glaip_sdk/cli/commands/update.py +61 -0
- glaip_sdk/cli/config.py +95 -0
- glaip_sdk/cli/constants.py +38 -0
- glaip_sdk/cli/context.py +150 -0
- glaip_sdk/cli/core/__init__.py +79 -0
- glaip_sdk/cli/core/context.py +124 -0
- glaip_sdk/cli/core/output.py +846 -0
- glaip_sdk/cli/core/prompting.py +649 -0
- glaip_sdk/cli/core/rendering.py +187 -0
- glaip_sdk/cli/display.py +143 -53
- glaip_sdk/cli/hints.py +57 -0
- glaip_sdk/cli/io.py +24 -18
- glaip_sdk/cli/main.py +420 -145
- glaip_sdk/cli/masking.py +136 -0
- glaip_sdk/cli/mcp_validators.py +287 -0
- glaip_sdk/cli/pager.py +266 -0
- glaip_sdk/cli/parsers/__init__.py +7 -0
- glaip_sdk/cli/parsers/json_input.py +177 -0
- glaip_sdk/cli/resolution.py +28 -21
- glaip_sdk/cli/rich_helpers.py +27 -0
- glaip_sdk/cli/slash/__init__.py +15 -0
- glaip_sdk/cli/slash/accounts_controller.py +500 -0
- glaip_sdk/cli/slash/accounts_shared.py +75 -0
- glaip_sdk/cli/slash/agent_session.py +282 -0
- glaip_sdk/cli/slash/prompt.py +245 -0
- glaip_sdk/cli/slash/remote_runs_controller.py +566 -0
- glaip_sdk/cli/slash/session.py +1679 -0
- glaip_sdk/cli/slash/tui/__init__.py +9 -0
- glaip_sdk/cli/slash/tui/accounts.tcss +86 -0
- glaip_sdk/cli/slash/tui/accounts_app.py +872 -0
- glaip_sdk/cli/slash/tui/background_tasks.py +72 -0
- glaip_sdk/cli/slash/tui/loading.py +58 -0
- glaip_sdk/cli/slash/tui/remote_runs_app.py +628 -0
- glaip_sdk/cli/transcript/__init__.py +31 -0
- glaip_sdk/cli/transcript/cache.py +536 -0
- glaip_sdk/cli/transcript/capture.py +329 -0
- glaip_sdk/cli/transcript/export.py +38 -0
- glaip_sdk/cli/transcript/history.py +815 -0
- glaip_sdk/cli/transcript/launcher.py +77 -0
- glaip_sdk/cli/transcript/viewer.py +372 -0
- glaip_sdk/cli/update_notifier.py +290 -0
- glaip_sdk/cli/utils.py +247 -1238
- glaip_sdk/cli/validators.py +16 -18
- glaip_sdk/client/__init__.py +2 -1
- glaip_sdk/client/_agent_payloads.py +520 -0
- glaip_sdk/client/agent_runs.py +147 -0
- glaip_sdk/client/agents.py +940 -574
- glaip_sdk/client/base.py +163 -48
- glaip_sdk/client/main.py +35 -12
- glaip_sdk/client/mcps.py +126 -18
- glaip_sdk/client/run_rendering.py +415 -0
- glaip_sdk/client/shared.py +21 -0
- glaip_sdk/client/tools.py +195 -37
- glaip_sdk/client/validators.py +20 -48
- glaip_sdk/config/constants.py +15 -5
- glaip_sdk/exceptions.py +16 -9
- glaip_sdk/icons.py +25 -0
- glaip_sdk/mcps/__init__.py +21 -0
- glaip_sdk/mcps/base.py +345 -0
- glaip_sdk/models/__init__.py +90 -0
- glaip_sdk/models/agent.py +47 -0
- glaip_sdk/models/agent_runs.py +116 -0
- glaip_sdk/models/common.py +42 -0
- glaip_sdk/models/mcp.py +33 -0
- glaip_sdk/models/tool.py +33 -0
- glaip_sdk/payload_schemas/__init__.py +7 -0
- glaip_sdk/payload_schemas/agent.py +85 -0
- 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 +231 -0
- glaip_sdk/rich_components.py +98 -2
- glaip_sdk/runner/__init__.py +59 -0
- glaip_sdk/runner/base.py +84 -0
- glaip_sdk/runner/deps.py +115 -0
- glaip_sdk/runner/langgraph.py +597 -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 +158 -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 +177 -0
- glaip_sdk/tools/__init__.py +22 -0
- glaip_sdk/tools/base.py +435 -0
- glaip_sdk/utils/__init__.py +59 -13
- glaip_sdk/utils/a2a/__init__.py +34 -0
- glaip_sdk/utils/a2a/event_processor.py +188 -0
- glaip_sdk/utils/agent_config.py +53 -40
- glaip_sdk/utils/bundler.py +267 -0
- glaip_sdk/utils/client.py +111 -0
- glaip_sdk/utils/client_utils.py +58 -26
- glaip_sdk/utils/datetime_helpers.py +58 -0
- glaip_sdk/utils/discovery.py +78 -0
- glaip_sdk/utils/display.py +65 -32
- glaip_sdk/utils/export.py +143 -0
- glaip_sdk/utils/general.py +1 -36
- glaip_sdk/utils/import_export.py +20 -25
- glaip_sdk/utils/import_resolver.py +492 -0
- glaip_sdk/utils/instructions.py +101 -0
- glaip_sdk/utils/rendering/__init__.py +115 -1
- glaip_sdk/utils/rendering/formatting.py +85 -43
- glaip_sdk/utils/rendering/layout/__init__.py +64 -0
- glaip_sdk/utils/rendering/{renderer → layout}/panels.py +51 -19
- glaip_sdk/utils/rendering/layout/progress.py +202 -0
- glaip_sdk/utils/rendering/layout/summary.py +74 -0
- glaip_sdk/utils/rendering/layout/transcript.py +606 -0
- glaip_sdk/utils/rendering/models.py +39 -7
- glaip_sdk/utils/rendering/renderer/__init__.py +9 -51
- glaip_sdk/utils/rendering/renderer/base.py +672 -759
- glaip_sdk/utils/rendering/renderer/config.py +4 -10
- glaip_sdk/utils/rendering/renderer/debug.py +75 -22
- 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/manager.py +387 -0
- 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 +422 -0
- glaip_sdk/utils/serialization.py +184 -51
- glaip_sdk/utils/sync.py +142 -0
- glaip_sdk/utils/tool_detection.py +33 -0
- glaip_sdk/utils/validation.py +21 -30
- {glaip_sdk-0.0.7.dist-info → glaip_sdk-0.6.5b6.dist-info}/METADATA +58 -12
- glaip_sdk-0.6.5b6.dist-info/RECORD +159 -0
- {glaip_sdk-0.0.7.dist-info → glaip_sdk-0.6.5b6.dist-info}/WHEEL +1 -1
- glaip_sdk/models.py +0 -250
- glaip_sdk/utils/rendering/renderer/progress.py +0 -118
- glaip_sdk/utils/rendering/steps.py +0 -232
- glaip_sdk/utils/rich_utils.py +0 -29
- glaip_sdk-0.0.7.dist-info/RECORD +0 -55
- {glaip_sdk-0.0.7.dist-info → glaip_sdk-0.6.5b6.dist-info}/entry_points.txt +0 -0
|
@@ -1,27 +1,41 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: glaip-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.5b6
|
|
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
|
|
7
7
|
Author-email: raymond.christopher@gdplabs.id
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.11,<3.13
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: aip-agents-binary (>=0.5.0)
|
|
15
|
+
Requires-Dist: click (>=8.2.0,<8.3.0)
|
|
16
|
+
Requires-Dist: gllm-core-binary (>=0.1.0)
|
|
17
|
+
Requires-Dist: gllm-tools-binary (>=0.1.3)
|
|
15
18
|
Requires-Dist: httpx (>=0.28.1)
|
|
19
|
+
Requires-Dist: langchain-core (>=0.3.0)
|
|
20
|
+
Requires-Dist: packaging (>=23.2)
|
|
21
|
+
Requires-Dist: pre-commit (>=4.3.0) ; extra == "dev"
|
|
16
22
|
Requires-Dist: pydantic (>=2.0.0)
|
|
23
|
+
Requires-Dist: pytest (>=7.0.0) ; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-asyncio (>=0.23.6) ; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest-cov (>=4.0.0) ; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-dotenv (>=0.5.2) ; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-timeout (>=2.3.1) ; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-xdist (>=3.8.0) ; extra == "dev"
|
|
17
29
|
Requires-Dist: python-dotenv (>=1.1.1,<2.0.0)
|
|
18
30
|
Requires-Dist: pyyaml (>=6.0.0)
|
|
19
31
|
Requires-Dist: questionary (>=2.1.0,<3.0.0)
|
|
20
32
|
Requires-Dist: readchar (>=4.2.1,<5.0.0)
|
|
21
33
|
Requires-Dist: rich (>=13.0.0)
|
|
34
|
+
Requires-Dist: ruff (>=0.14.0) ; extra == "dev"
|
|
35
|
+
Requires-Dist: textual (>=0.52.0)
|
|
22
36
|
Description-Content-Type: text/markdown
|
|
23
37
|
|
|
24
|
-
# GL AIP
|
|
38
|
+
# GL AIP — GDP Labs AI Agents Package
|
|
25
39
|
|
|
26
40
|
[](https://www.python.org/downloads/)
|
|
27
41
|
[](https://github.com/psf/black)
|
|
@@ -169,15 +183,47 @@ aip agents run <AGENT_ID> --input "Hello world, what's the weather like?"
|
|
|
169
183
|
- **🔄 Multi-Agent Patterns**: Hierarchical, parallel, sequential, router, and aggregator patterns
|
|
170
184
|
- **💻 Modern CLI**: Rich terminal interface with fuzzy search and multiple output formats
|
|
171
185
|
|
|
186
|
+
## 🌳 Live Steps Panel
|
|
187
|
+
|
|
188
|
+
The CLI steps panel now streams a fully hierarchical tree so you can audit complex agent runs without leaving the terminal.
|
|
189
|
+
|
|
190
|
+
- Renders parent/child relationships with `│├└` connectors, even when events arrive out of order
|
|
191
|
+
- Marks running steps with spinners and duration badges sourced from SSE metadata before local fallbacks
|
|
192
|
+
- Highlights failures inline (`✗ reason`) and raises warning glyphs on affected delegate branches
|
|
193
|
+
- Derives deterministic “💭 Thinking…” spans before/after each delegate or tool action to show scheduling gaps
|
|
194
|
+
- Flags parallel work with a dedicated glyph and argument-derived labels so simultaneous tool calls stay readable
|
|
195
|
+
- Try it locally: `poetry run python scripts/replay_steps_log.py --transcript tests/fixtures/rendering/transcripts/parallel_research.jsonl --output /tmp/parallel.log`
|
|
196
|
+
|
|
172
197
|
## 📚 Documentation
|
|
173
198
|
|
|
174
|
-
📖 **[Complete Documentation](https://gdplabs.gitbook.io/
|
|
199
|
+
📖 **[Complete Documentation](https://gdplabs.gitbook.io/gl-aip/gl-aip-sdk/overview)** - Visit our GitBook for comprehensive guides, tutorials, and API reference.
|
|
175
200
|
|
|
176
201
|
Quick links:
|
|
177
202
|
|
|
178
|
-
- **[Quick Start Guide](
|
|
179
|
-
- **[Agent Management](
|
|
180
|
-
- **[Custom Tools](
|
|
181
|
-
- **[MCP Integration](
|
|
182
|
-
- **[API Reference](
|
|
203
|
+
- **[Quick Start Guide](https://gdplabs.gitbook.io/gl-aip/gl-aip-sdk/get-started/quick-start-guide)**: Get your first agent running in 5 minutes
|
|
204
|
+
- **[Agent Management](https://gdplabs.gitbook.io/gl-aip/gl-aip-sdk/guides/agents-guide)**: Complete agent lifecycle management
|
|
205
|
+
- **[Custom Tools](https://gdplabs.gitbook.io/gl-aip/gl-aip-sdk/guides/tools-guide)**: Build and integrate custom tools
|
|
206
|
+
- **[MCP Integration](https://gdplabs.gitbook.io/gl-aip/gl-aip-sdk/guides/mcps-guide)**: Connect external services
|
|
207
|
+
- **[API Reference](https://gdplabs.gitbook.io/gl-aip/gl-aip-sdk/reference/python-sdk-reference)**: Complete SDK reference
|
|
208
|
+
|
|
209
|
+
## 🧪 Simulate the Update Notifier
|
|
210
|
+
|
|
211
|
+
Need to verify the in-session upgrade flow without hitting PyPI or actually running `pip install`? Use the bundled helper:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
cd python/glaip-sdk
|
|
215
|
+
poetry run python scripts/mock_update_notifier.py
|
|
216
|
+
# or customize the mock payload:
|
|
217
|
+
# poetry run python scripts/mock_update_notifier.py --version 3.3.3 --marker "[nightly build]"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
The script:
|
|
221
|
+
|
|
222
|
+
- Launches a SlashSession with prompt-toolkit disabled (so it runs cleanly in tests/CI).
|
|
223
|
+
- Forces the notifier to believe a newer version exists (`--version 9.9.9` by default).
|
|
224
|
+
- Appends a visible marker (default `[mock update]`) to the banner so you can prove the branding reload happened; pass `--marker ""` to skip.
|
|
225
|
+
- Auto-selects “Update now”, mocks the install step, and runs the real branding refresh logic.
|
|
226
|
+
- Resets module metadata afterwards so your environment remains untouched.
|
|
227
|
+
|
|
228
|
+
You should see the Rich banner re-render with the mocked version (and optional marker) at the end of the run.
|
|
183
229
|
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
glaip_sdk/__init__.py,sha256=0PAFfodqAEdggIiV1Es_JryDokZrhYLFFIXosqdguJU,420
|
|
2
|
+
glaip_sdk/_version.py,sha256=5CHGCxx_36fgmMWuEx6jJ2CzzM-i9eBFyQWFwBi23XE,2259
|
|
3
|
+
glaip_sdk/agents/__init__.py,sha256=VfYov56edbWuySXFEbWJ_jLXgwnFzPk1KB-9-mfsUCc,776
|
|
4
|
+
glaip_sdk/agents/base.py,sha256=xCu4vZ2EOXbpsY38Cbebdqz-7ZNmZK9_wo8DxyZh7eA,39577
|
|
5
|
+
glaip_sdk/branding.py,sha256=tLqYCIHMkUf8p2smpuAGNptwaKUN38G4mlh0A0DOl_w,7823
|
|
6
|
+
glaip_sdk/cli/__init__.py,sha256=xCCfuF1Yc7mpCDcfhHZTX0vizvtrDSLeT8MJ3V7m5A0,156
|
|
7
|
+
glaip_sdk/cli/account_store.py,sha256=TK4iTV93Q1uD9mCY_2ZMT6EazHKU2jX0qhgWfEM4V-4,18459
|
|
8
|
+
glaip_sdk/cli/agent_config.py,sha256=YAbFKrTNTRqNA6b0i0Q3pH-01rhHDRi5v8dxSFwGSwM,2401
|
|
9
|
+
glaip_sdk/cli/auth.py,sha256=e3Ctkjz3HBFk2mJE5xYpg78flot_luByLhqJ_bVtIsM,24149
|
|
10
|
+
glaip_sdk/cli/commands/__init__.py,sha256=6Z3ASXDut0lAbUX_umBFtxPzzFyqoiZfVeTahThFu1A,219
|
|
11
|
+
glaip_sdk/cli/commands/accounts.py,sha256=J89chwJWWpEv6TBXaGPUJH-aLrM9Ymxp4jywp5YUUEo,24685
|
|
12
|
+
glaip_sdk/cli/commands/agents.py,sha256=WCOzllyh_Znwlju5camT4vE6OeRJbsAmjWwcyiAqWs4,48429
|
|
13
|
+
glaip_sdk/cli/commands/common_config.py,sha256=chCa0B5t6JER-pGPzItUK7fk_qQgTwf7bIRU004PrUI,3731
|
|
14
|
+
glaip_sdk/cli/commands/configure.py,sha256=95PQiJnpvsdH02v_tLVANd64qAJJnZKlhNe4tpfWIS4,30262
|
|
15
|
+
glaip_sdk/cli/commands/mcps.py,sha256=tttqQnfM89iI9Pm94u8YRhiHMQNYNouecFX0brsT4cQ,42551
|
|
16
|
+
glaip_sdk/cli/commands/models.py,sha256=vfcGprK5CHprQ0CNpNzQlNNTELvdgKC7JxTG_ijOwmE,2009
|
|
17
|
+
glaip_sdk/cli/commands/tools.py,sha256=_VBqG-vIjnn-gqvDlSTvcU7_F4N3ANGGKEECcQVR-BM,18430
|
|
18
|
+
glaip_sdk/cli/commands/transcripts.py,sha256=ofxZLus1xLB061NxrLo1J6LPEb2VIxJTjmz7hLKgPmc,26377
|
|
19
|
+
glaip_sdk/cli/commands/update.py,sha256=rIZo_x-tvpvcwpQLpwYwso1ix6qTHuNNTL4egmn5fEM,1812
|
|
20
|
+
glaip_sdk/cli/config.py,sha256=s0_xBB1e5YE4I_Wc4q-ayY3dwsBU1JrHAF-8ySlim7Y,3040
|
|
21
|
+
glaip_sdk/cli/constants.py,sha256=zqcVtzfj6huW97gbCmhkFqntge1H-c1vnkGqTazADgU,895
|
|
22
|
+
glaip_sdk/cli/context.py,sha256=--Y5vc6lgoAV7cRoUAr9UxSQaLmkMg29FolA7EwoRqM,3803
|
|
23
|
+
glaip_sdk/cli/core/__init__.py,sha256=HTQqpijKNts6bYnwY97rpP3J324phoQmGFi6OXqi0E4,2116
|
|
24
|
+
glaip_sdk/cli/core/context.py,sha256=I22z5IhZ09g5FPtMycDGU9Aj20Qv3TOQLhA5enaU2qk,3970
|
|
25
|
+
glaip_sdk/cli/core/output.py,sha256=9pkwT4mm-MEQ-dWjJrTDQL7-SVzePTkYnaY6vzSDztY,28045
|
|
26
|
+
glaip_sdk/cli/core/prompting.py,sha256=U6cxTSBNSa5-55M4W9zWCD_QSkkV912xTeOIRwXSDW8,21046
|
|
27
|
+
glaip_sdk/cli/core/rendering.py,sha256=QgbYzTcKH8wa7-BdR3UgiS3KBx1QYZjDcV2Hyy5ox_Q,5878
|
|
28
|
+
glaip_sdk/cli/display.py,sha256=ojgWdGeD5KUnGOmWNqqK4JP-1EaWHWX--DWze3BmIz0,12137
|
|
29
|
+
glaip_sdk/cli/hints.py,sha256=ca4krG103IS43s5BSLr0-N7uRMpte1_LY4nAXVvgDxo,1596
|
|
30
|
+
glaip_sdk/cli/io.py,sha256=ChP6CRKbtuENsNomNEaMDfPDU0iqO-WuVvl4_y7F2io,3871
|
|
31
|
+
glaip_sdk/cli/main.py,sha256=Kuz65r6gcAUQNSunEpJTOXp4eXrGv-yda_91J9YJYHs,21579
|
|
32
|
+
glaip_sdk/cli/masking.py,sha256=2lrXQ-pfL7N-vNEQRT1s4Xq3JPDPDT8RC61OdaTtkkc,4060
|
|
33
|
+
glaip_sdk/cli/mcp_validators.py,sha256=cwbz7p_p7_9xVuuF96OBQOdmEgo5UObU6iWWQ2X03PI,10047
|
|
34
|
+
glaip_sdk/cli/pager.py,sha256=XygkAB6UW3bte7I4KmK7-PUGCJiq2Pv-4-MfyXAmXCw,7925
|
|
35
|
+
glaip_sdk/cli/parsers/__init__.py,sha256=NzLrSH6GOdNoewXtKNpB6GwrauA8rb_IGYV6cz5Hn3o,113
|
|
36
|
+
glaip_sdk/cli/parsers/json_input.py,sha256=kxoxeIlgfsaH2jhe6apZAgSxAtwlpSINLTMRsZZYboQ,5630
|
|
37
|
+
glaip_sdk/cli/resolution.py,sha256=K-VaEHm9SYY_qfb9538VNHykL4_2N6F8iQqI1zMx_64,2402
|
|
38
|
+
glaip_sdk/cli/rich_helpers.py,sha256=kO47N8e506rxrN6Oc9mbAWN3Qb536oQPWZy1s9A616g,819
|
|
39
|
+
glaip_sdk/cli/slash/__init__.py,sha256=J9TPL2UcNTkW8eifG6nRmAEGHhyEgdYMYk4cHaaObC0,386
|
|
40
|
+
glaip_sdk/cli/slash/accounts_controller.py,sha256=BDKaEfVbMh1B2T4GW3FF5hJo0SCe9_Pmy8vvyXtI9LY,21562
|
|
41
|
+
glaip_sdk/cli/slash/accounts_shared.py,sha256=Mq5HxlI0YsVEQ0KKISWvyBZhzOFFWCzwRbhF5xwvUbM,2626
|
|
42
|
+
glaip_sdk/cli/slash/agent_session.py,sha256=9r1xNRk5mk6rfJXV6KIf2Yo4B4hjknimd9fkxH1LO3c,11304
|
|
43
|
+
glaip_sdk/cli/slash/prompt.py,sha256=2urqR3QqN3O09lHmKKSEbhsIdlS4B7hm9O8AP_VwCSU,8034
|
|
44
|
+
glaip_sdk/cli/slash/remote_runs_controller.py,sha256=Ok6CezIeF1CPGQ8-QN3TRx5kGGEACOrgyPwH_BRRCyI,21354
|
|
45
|
+
glaip_sdk/cli/slash/session.py,sha256=8pfO21vAbpxWnE71fthXXsR0TijYBDDhHR-8LFFapUs,63028
|
|
46
|
+
glaip_sdk/cli/slash/tui/__init__.py,sha256=ljBAeAFY2qNDkbJrZh5NgXxjwUlsv9-UxgKNIv0AF1Q,274
|
|
47
|
+
glaip_sdk/cli/slash/tui/accounts.tcss,sha256=xuQjQ0tBM08K1DUv6lI5Sfu1zgZzQxg60c9-RlEWB4s,1160
|
|
48
|
+
glaip_sdk/cli/slash/tui/accounts_app.py,sha256=dE0w10MSGPgjE7YQl8LzF1pSYu6LKX-L6eYMFOM2530,33593
|
|
49
|
+
glaip_sdk/cli/slash/tui/background_tasks.py,sha256=SAe1mV2vXB3mJcSGhelU950vf8Lifjhws9iomyIVFKw,2422
|
|
50
|
+
glaip_sdk/cli/slash/tui/loading.py,sha256=nW5pv_Tnl9FUOPR3Qf2O5gt1AGHSo3b5-Uofg34F6AE,1909
|
|
51
|
+
glaip_sdk/cli/slash/tui/remote_runs_app.py,sha256=RCrI-c5ilKV6Iy1lz2Aok9xo2Ou02vqcXACMXTdodnE,24716
|
|
52
|
+
glaip_sdk/cli/transcript/__init__.py,sha256=yiYHyNtebMCu3BXu56Xm5RBC2tDc865q8UGPnoe6QRs,920
|
|
53
|
+
glaip_sdk/cli/transcript/cache.py,sha256=Wi1uln6HP1U6F-MRTrfnxi9bn6XJTxwWXhREIRPoMqQ,17439
|
|
54
|
+
glaip_sdk/cli/transcript/capture.py,sha256=t8j_62cC6rhb51oCluZd17N04vcXqyjkhPRcRd3ZcmM,10291
|
|
55
|
+
glaip_sdk/cli/transcript/export.py,sha256=reCvrZVzli8_LzYe5ZNdaa-MwZ1ov2RjnDzKZWr_6-E,1117
|
|
56
|
+
glaip_sdk/cli/transcript/history.py,sha256=2FBjawxP8CX9gRPMUMP8bDjG50BGM2j2zk6IfHvAMH4,26211
|
|
57
|
+
glaip_sdk/cli/transcript/launcher.py,sha256=z5ivkPXDQJpATIqtRLUK8jH3p3WIZ72PvOPqYRDMJvw,2327
|
|
58
|
+
glaip_sdk/cli/transcript/viewer.py,sha256=ar1SzRkhKIf3_DgFz1EG1RZGDmd2w2wogAe038DLL_M,13037
|
|
59
|
+
glaip_sdk/cli/update_notifier.py,sha256=FnTjzS8YT94RmP6c5aU_XNIyRi7FRHvAskMy-VJikl8,10064
|
|
60
|
+
glaip_sdk/cli/utils.py,sha256=iemmKkpPndoZFBasoVqV7QArplchtr08yYWLA2efMzg,11996
|
|
61
|
+
glaip_sdk/cli/validators.py,sha256=d-kq4y7HWMo6Gc7wLXWUsCt8JwFvJX_roZqRm1Nko1I,5622
|
|
62
|
+
glaip_sdk/client/__init__.py,sha256=F-eE_dRSzA0cc1it06oi0tZetZBHmSUjWSHGhJMLCls,263
|
|
63
|
+
glaip_sdk/client/_agent_payloads.py,sha256=cH7CvNRn0JvudwKLr072E7W2QGWO9r-4xDxWMvXoPKE,17865
|
|
64
|
+
glaip_sdk/client/agent_runs.py,sha256=tZSFEZZ3Yx0uYRgnwkLe-X0TlmgKJQ-ivzb6SrVnxY8,4862
|
|
65
|
+
glaip_sdk/client/agents.py,sha256=33Wr5BYLN6uSN_Vwdine-9KKT030nDnsEArytN9g0lc,47580
|
|
66
|
+
glaip_sdk/client/base.py,sha256=BhNaC2TJJ2jVWRTYmfxD3WjYgAyIuWNz9YURdNXXjJo,18245
|
|
67
|
+
glaip_sdk/client/main.py,sha256=RTREAOgGouYm4lFKkpNBQ9dmxalnBsIpSSaQLWVFSmU,9054
|
|
68
|
+
glaip_sdk/client/mcps.py,sha256=gFRuLOGeh6ieIhR4PeD6yNVT6NhvUMTqPq9iuu1vkAY,13019
|
|
69
|
+
glaip_sdk/client/run_rendering.py,sha256=ubBO-NzyZoYRELNwxVvrQFRGQVJCuLfqqJNiXrBZDoQ,14223
|
|
70
|
+
glaip_sdk/client/shared.py,sha256=esHlsR0LEfL-pFDaWebQjKKOLl09jsRY-2pllBUn4nU,522
|
|
71
|
+
glaip_sdk/client/tools.py,sha256=RR7345wECqPtofDXPW12VOnLtus554tXleL0YHQy82U,22435
|
|
72
|
+
glaip_sdk/client/validators.py,sha256=ioF9VCs-LG2yLkaRDd7Hff74lojDZZ0_Q3CiLbdm1RY,8381
|
|
73
|
+
glaip_sdk/config/constants.py,sha256=Y03c6op0e7K0jTQ8bmWXhWAqsnjWxkAhWniq8Z0iEKY,1081
|
|
74
|
+
glaip_sdk/exceptions.py,sha256=iAChFClkytXRBLP0vZq1_YjoZxA9i4m4bW1gDLiGR1g,2321
|
|
75
|
+
glaip_sdk/icons.py,sha256=J5THz0ReAmDwIiIooh1_G3Le-mwTJyEjhJDdJ13KRxM,524
|
|
76
|
+
glaip_sdk/mcps/__init__.py,sha256=4jYrt8K__oxrxexHRcmnRBXt-W_tbJN61H9Kf2lVh4Q,551
|
|
77
|
+
glaip_sdk/mcps/base.py,sha256=jWwHjDF67_mtDGRp9p5SolANjVeB8jt1PSwPBtX876M,11654
|
|
78
|
+
glaip_sdk/models/__init__.py,sha256=-qO4Yr1-fkyaYC9RcT3nYhplDjoXATrIFZr4JrqflHI,2577
|
|
79
|
+
glaip_sdk/models/agent.py,sha256=vtmUSDrrib1hvm0xnofIuOebqlrs-gIaLsny8hzg1iE,1523
|
|
80
|
+
glaip_sdk/models/agent_runs.py,sha256=MYgab07k8MfExjvI5_o6HxsksJZ3tl2TDZefVxzGc1g,3807
|
|
81
|
+
glaip_sdk/models/common.py,sha256=O30MEGO2nKcGhKbnPNkoGzwNvDVUBjM-uU-Tpigaz5Y,1180
|
|
82
|
+
glaip_sdk/models/mcp.py,sha256=ti_8MUf4k7qbR1gPs9JhqhybMcLUhZxEELtHQrTv2-U,944
|
|
83
|
+
glaip_sdk/models/tool.py,sha256=w3nL2DqyCtGgDPCd40Asi9obRGghQjLlC9Vt_p32Mpc,951
|
|
84
|
+
glaip_sdk/payload_schemas/__init__.py,sha256=nTJmzwn2BbEpzZdq-8U24eVHQHxqYO3_-SABMV9lS_Q,142
|
|
85
|
+
glaip_sdk/payload_schemas/agent.py,sha256=Nap68mI2Ba8eNGOhk79mGrYUoYUahcUJLof3DLWtVO4,3198
|
|
86
|
+
glaip_sdk/registry/__init__.py,sha256=mjvElYE-wwmbriGe-c6qy4on0ccEuWxW_EWWrSbptCw,1667
|
|
87
|
+
glaip_sdk/registry/agent.py,sha256=F0axW4BIUODqnttIOzxnoS5AqQkLZ1i48FTeZNnYkhA,5203
|
|
88
|
+
glaip_sdk/registry/base.py,sha256=0x2ZBhiERGUcf9mQeWlksSYs5TxDG6FxBYQToYZa5D4,4143
|
|
89
|
+
glaip_sdk/registry/mcp.py,sha256=kNJmiijIbZL9Btx5o2tFtbaT-WG6O4Xf_nl3wz356Ow,7978
|
|
90
|
+
glaip_sdk/registry/tool.py,sha256=Aq6eryE9hOF9XFnjaBwfnrQgii5uyMdMkLaqm9D9BEk,7765
|
|
91
|
+
glaip_sdk/rich_components.py,sha256=44Z0V1ZQleVh9gUDGwRR5mriiYFnVGOhm7fFxZYbP8c,4052
|
|
92
|
+
glaip_sdk/runner/__init__.py,sha256=8RrngoGfpF8x9X27RPdX4gJjch75ZvhtVt_6UV0ULLQ,1615
|
|
93
|
+
glaip_sdk/runner/base.py,sha256=KIjcSAyDCP9_mn2H4rXR5gu1FZlwD9pe0gkTBmr6Yi4,2663
|
|
94
|
+
glaip_sdk/runner/deps.py,sha256=3ZDWyvWu4LFJOGHd18tv3VzVo8NY5gb1VeZIelMknyI,3934
|
|
95
|
+
glaip_sdk/runner/langgraph.py,sha256=OPuD44EERJgrlQoM8iGEgGV5pA7e-WeCPHMSe4znYPs,21840
|
|
96
|
+
glaip_sdk/runner/mcp_adapter/__init__.py,sha256=Rdttfg3N6kg3-DaTCKqaGXKByZyBt0Mwf6FV8s_5kI8,462
|
|
97
|
+
glaip_sdk/runner/mcp_adapter/base_mcp_adapter.py,sha256=ic56fKgb3zgVZZQm3ClWUZi7pE1t4EVq8mOg6AM6hdA,1374
|
|
98
|
+
glaip_sdk/runner/mcp_adapter/langchain_mcp_adapter.py,sha256=88moaeTDW7KPxu6qh8mK4pr6oqpOLKLgXX66gFB-5J0,5715
|
|
99
|
+
glaip_sdk/runner/mcp_adapter/mcp_config_builder.py,sha256=fQcRaueDuyUzXUSVn9N8QxfaYNIteEO_R_uibx_0Icw,3440
|
|
100
|
+
glaip_sdk/runner/tool_adapter/__init__.py,sha256=scv8sSPxSWjlSNEace03R230YbmWgphLgqINKvDjWmM,480
|
|
101
|
+
glaip_sdk/runner/tool_adapter/base_tool_adapter.py,sha256=nL--eicV0St5_0PZZSEhRurHDZHNwhGN2cKOUh0C5IY,1400
|
|
102
|
+
glaip_sdk/runner/tool_adapter/langchain_tool_adapter.py,sha256=tmRYyPhih0a4_8c7Cg7ariYP2AEtHW69TRxqukwa2Ko,5438
|
|
103
|
+
glaip_sdk/tools/__init__.py,sha256=rhGzEqQFCzeMrxmikBuNrMz4PyYczwic28boDKVmoHs,585
|
|
104
|
+
glaip_sdk/tools/base.py,sha256=bvumLJ-DiQTmuYKgq2yCnlwrTZ9nYXpOwWU0e1vWR5g,15185
|
|
105
|
+
glaip_sdk/utils/__init__.py,sha256=ntohV7cxlY2Yksi2nFuFm_Mg2XVJbBbSJVRej7Mi9YE,2770
|
|
106
|
+
glaip_sdk/utils/a2a/__init__.py,sha256=_X8AvDOsHeppo5n7rP5TeisVxlAdkZDTFReBk_9lmxo,876
|
|
107
|
+
glaip_sdk/utils/a2a/event_processor.py,sha256=9Mjvvd4_4VDYeOkAI7_vF7N7_Dn0Kn23ramKyK32b3c,5993
|
|
108
|
+
glaip_sdk/utils/agent_config.py,sha256=RhcHsSOVwOaSC2ggnPuHn36Aa0keGJhs8KGb2InvzRk,7262
|
|
109
|
+
glaip_sdk/utils/bundler.py,sha256=fQWAv0e5qNjF1Lah-FGoA9W5Q59YaHbQfX_4ZB84YRw,9120
|
|
110
|
+
glaip_sdk/utils/client.py,sha256=otPUOIDvLCCsvFBNR8YMZFtRrORggmvvlFjl3YeeTqQ,3121
|
|
111
|
+
glaip_sdk/utils/client_utils.py,sha256=hzHxxNuM37mK4HhgIdS0qg4AqjAA5ai2irPO6Nr1Uzo,15350
|
|
112
|
+
glaip_sdk/utils/datetime_helpers.py,sha256=QLknNLEAY56628-MTRKnCXAffATkF33erOqBubKmU98,1544
|
|
113
|
+
glaip_sdk/utils/discovery.py,sha256=DbnPuCXuS5mwTZ9fMfsPHQDJltFV99Wf8Em0YttktVU,1994
|
|
114
|
+
glaip_sdk/utils/display.py,sha256=zu3SYqxj9hPyEN8G1vIXv_yXBkV8jLLCXEg2rs8NlzM,4485
|
|
115
|
+
glaip_sdk/utils/export.py,sha256=1NxxE3wGsA1auzecG5oJw5ELB4VmPljoeIkGhrGOh1I,5006
|
|
116
|
+
glaip_sdk/utils/general.py,sha256=3HSVIopUsIymPaim-kP2lqLX75TkkdIVLe6g3UKabZ0,1507
|
|
117
|
+
glaip_sdk/utils/import_export.py,sha256=RCvoydm_6_L7_J1igcE6IYDunqgS5mQUbWT4VGrytMw,5510
|
|
118
|
+
glaip_sdk/utils/import_resolver.py,sha256=rvNNLjSB1pbQTgkjEy9C8O_P475FefaBpctkiQAom8Y,16250
|
|
119
|
+
glaip_sdk/utils/instructions.py,sha256=MTk93lsq3I8aRnvnRMSXXNMzcpnaIM_Pm3Aiiiq3GBc,2997
|
|
120
|
+
glaip_sdk/utils/rendering/__init__.py,sha256=cJhhBEf46RnmUGJ1fivGkFuCoOn2pkJkSuRWoo1xlhE,3608
|
|
121
|
+
glaip_sdk/utils/rendering/formatting.py,sha256=tP-CKkKFDhiAHS1vpJQ3D6NmPVl0TX1ZOwBOoxia2eE,8009
|
|
122
|
+
glaip_sdk/utils/rendering/layout/__init__.py,sha256=Lz8eLXDO28wyK36BhKJ6o9YmsRjmQZrNhvZ2wwSjvPw,1609
|
|
123
|
+
glaip_sdk/utils/rendering/layout/panels.py,sha256=c7EhMznVxIiclrFERJuc3qem21t7sQI6BDcmujtdSAk,3905
|
|
124
|
+
glaip_sdk/utils/rendering/layout/progress.py,sha256=GhOhUPNQd8-e6JxTJsV76s6wIYhtTw2G1C3BY9yhtRk,6418
|
|
125
|
+
glaip_sdk/utils/rendering/layout/summary.py,sha256=K-gkDxwUxF67-4nF20y6hv95QEwRZCQI9Eb4KbA8eQY,2325
|
|
126
|
+
glaip_sdk/utils/rendering/layout/transcript.py,sha256=vbfywtbWCDzLY9B5Vvf4crhomftFq-UEz7zqySiLrD8,19052
|
|
127
|
+
glaip_sdk/utils/rendering/models.py,sha256=LtBgF0CyFnVW_oLAR8O62P-h8auCJwlgZaMUhmE8V-0,2882
|
|
128
|
+
glaip_sdk/utils/rendering/renderer/__init__.py,sha256=lpf0GnNGcPb8gq_hJM6Puflwy3eTigVK9qXP01nWRv0,1754
|
|
129
|
+
glaip_sdk/utils/rendering/renderer/base.py,sha256=YwUz0gS4C55BWEDmwD-gp35Tp_QCryxhld2gV--y8lE,38968
|
|
130
|
+
glaip_sdk/utils/rendering/renderer/config.py,sha256=FgSAZpG1g7Atm2MXg0tY0lOEciY90MR-RO6YuGFhp0E,626
|
|
131
|
+
glaip_sdk/utils/rendering/renderer/console.py,sha256=4cLOw4Q1fkHkApuj6dWW8eYpeYdcT0t2SO5MbVt5UTc,1844
|
|
132
|
+
glaip_sdk/utils/rendering/renderer/debug.py,sha256=qyqFXltYzKEqajwlu8QFSBU3P46JzMzIZqurejhx14o,5907
|
|
133
|
+
glaip_sdk/utils/rendering/renderer/factory.py,sha256=3p1Uga_UEN-wwTNerNaDB3qf3-yu1a9DfH4weXxeRdA,4711
|
|
134
|
+
glaip_sdk/utils/rendering/renderer/stream.py,sha256=htqm8pujXGKJncO86d-dfHixv9btACBgwPbO_brUQio,7812
|
|
135
|
+
glaip_sdk/utils/rendering/renderer/summary_window.py,sha256=ffBsVHaUyy2RfIuXLjhfiO31HeeprVcPP_pe4cjDLsU,2286
|
|
136
|
+
glaip_sdk/utils/rendering/renderer/thinking.py,sha256=09dYbtzpOrG5SlhuqpW9uqPCpiijPQuIntsNboMDDJ8,9399
|
|
137
|
+
glaip_sdk/utils/rendering/renderer/toggle.py,sha256=N3LB4g1r8EdDkQyItQdrP5gig6Sszz9uZ6WJuD0KUmk,5396
|
|
138
|
+
glaip_sdk/utils/rendering/renderer/tool_panels.py,sha256=ev7gZsakUMxfG4JoS_bBDey_MwMDyOLwVhTO536v608,17246
|
|
139
|
+
glaip_sdk/utils/rendering/renderer/transcript_mode.py,sha256=FBZVQYrXF5YH79g3gYizE6P_yL5k9ZSGViCmZhv6C4g,6013
|
|
140
|
+
glaip_sdk/utils/rendering/state.py,sha256=54ViIHCGoBHQE4yMOrB2ToK3FZuv7SsD0Qcyq3CEKe4,6540
|
|
141
|
+
glaip_sdk/utils/rendering/step_tree_state.py,sha256=EItKFTV2FYvm5pSyHbXk7lkzJ-0DW_s-VENIBZe8sp4,4062
|
|
142
|
+
glaip_sdk/utils/rendering/steps/__init__.py,sha256=y1BJUPeT4bclXPmsy6B66KNZWiY8W5p-LnLnlrxynP8,840
|
|
143
|
+
glaip_sdk/utils/rendering/steps/event_processor.py,sha256=sGOHpxm7WmKxxY68l9Su6_YbDkXcoFblwkv1fToSX5k,29048
|
|
144
|
+
glaip_sdk/utils/rendering/steps/format.py,sha256=Chnq7OBaj8XMeBntSBxrX5zSmrYeGcOszooNeBe7_pM,5654
|
|
145
|
+
glaip_sdk/utils/rendering/steps/manager.py,sha256=BiBmTeQMQhjRMykgICXsXNYh1hGsss-fH9BIGVMWFi0,13194
|
|
146
|
+
glaip_sdk/utils/rendering/timing.py,sha256=__F1eFPoocm7Dps7Y1O_gJV24HsNTbx_FMiqEDN4T9o,1063
|
|
147
|
+
glaip_sdk/utils/rendering/viewer/__init__.py,sha256=XrxmE2cMAozqrzo1jtDFm8HqNtvDcYi2mAhXLXn5CjI,457
|
|
148
|
+
glaip_sdk/utils/rendering/viewer/presenter.py,sha256=mlLMTjnyeyPVtsyrAbz1BJu9lFGQSlS-voZ-_Cuugv0,5725
|
|
149
|
+
glaip_sdk/utils/resource_refs.py,sha256=vF34kyAtFBLnaKnQVrsr2st1JiSxVbIZ4yq0DelJvCI,5966
|
|
150
|
+
glaip_sdk/utils/run_renderer.py,sha256=d_VMI6LbvHPUUeRmGqh5wK_lHqDEIAcym2iqpbtDad0,1365
|
|
151
|
+
glaip_sdk/utils/runtime_config.py,sha256=SPvc2qF7qGio745kMwOOtzXY1-pHI3Vi3BJHcHFhwiE,13634
|
|
152
|
+
glaip_sdk/utils/serialization.py,sha256=z-qpvWLSBrGK3wbUclcA1UIKLXJedTnMSwPdq-FF4lo,13308
|
|
153
|
+
glaip_sdk/utils/sync.py,sha256=3VKqs1UfNGWSobgRXohBKP7mMMzdUW3SU0bJQ1uxOgw,4872
|
|
154
|
+
glaip_sdk/utils/tool_detection.py,sha256=g410GNug_PhLye8rd9UU-LVFIKq3jHPbmSItEkLxPTc,807
|
|
155
|
+
glaip_sdk/utils/validation.py,sha256=hB_k3lvHdIFUiSwHStrC0Eqnhx0OG2UvwqASeem0HuQ,6859
|
|
156
|
+
glaip_sdk-0.6.5b6.dist-info/METADATA,sha256=b7tq7eogU3i0Ran1V93NFYHCZzww92JDohcL7ggH9Ac,7622
|
|
157
|
+
glaip_sdk-0.6.5b6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
158
|
+
glaip_sdk-0.6.5b6.dist-info/entry_points.txt,sha256=EGs8NO8J1fdFMWA3CsF7sKBEvtHb_fujdCoNPhfMouE,47
|
|
159
|
+
glaip_sdk-0.6.5b6.dist-info/RECORD,,
|
glaip_sdk/models.py
DELETED
|
@@ -1,250 +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 verbose flag through to enable event JSON output
|
|
62
|
-
return self._client.run_agent(self.id, message, verbose=verbose, **kwargs)
|
|
63
|
-
|
|
64
|
-
async def arun(self, message: str, **kwargs) -> AsyncGenerator[dict, None]:
|
|
65
|
-
"""Async run the agent with a message, yielding streaming JSON chunks.
|
|
66
|
-
|
|
67
|
-
Args:
|
|
68
|
-
message: The message to send to the agent
|
|
69
|
-
**kwargs: Additional arguments passed to arun_agent
|
|
70
|
-
|
|
71
|
-
Yields:
|
|
72
|
-
Dictionary containing parsed JSON chunks from the streaming response
|
|
73
|
-
|
|
74
|
-
Raises:
|
|
75
|
-
RuntimeError: When no client is available
|
|
76
|
-
AgentTimeoutError: When agent execution times out
|
|
77
|
-
Exception: For other unexpected errors
|
|
78
|
-
"""
|
|
79
|
-
if not self._client:
|
|
80
|
-
raise RuntimeError(
|
|
81
|
-
"No client available. Use client.get_agent_by_id() to get a client-connected agent."
|
|
82
|
-
)
|
|
83
|
-
# Automatically pass the agent name for better context
|
|
84
|
-
kwargs.setdefault("agent_name", self.name)
|
|
85
|
-
|
|
86
|
-
async for chunk in self._client.arun_agent(self.id, message, **kwargs):
|
|
87
|
-
yield chunk
|
|
88
|
-
|
|
89
|
-
def update(self, **kwargs) -> "Agent":
|
|
90
|
-
"""Update agent attributes."""
|
|
91
|
-
if not self._client:
|
|
92
|
-
raise RuntimeError(
|
|
93
|
-
"No client available. Use client.get_agent_by_id() to get a client-connected agent."
|
|
94
|
-
)
|
|
95
|
-
updated_agent = self._client.update_agent(self.id, **kwargs)
|
|
96
|
-
# Update current instance with new data
|
|
97
|
-
for key, value in updated_agent.model_dump().items():
|
|
98
|
-
if hasattr(self, key):
|
|
99
|
-
setattr(self, key, value)
|
|
100
|
-
return self
|
|
101
|
-
|
|
102
|
-
def delete(self) -> None:
|
|
103
|
-
"""Delete the agent."""
|
|
104
|
-
if not self._client:
|
|
105
|
-
raise RuntimeError(
|
|
106
|
-
"No client available. Use client.get_agent_by_id() to get a client-connected agent."
|
|
107
|
-
)
|
|
108
|
-
self._client.delete_agent(self.id)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
class Tool(BaseModel):
|
|
112
|
-
"""Tool model for API responses."""
|
|
113
|
-
|
|
114
|
-
id: str
|
|
115
|
-
name: str
|
|
116
|
-
tool_type: str | None = None
|
|
117
|
-
description: str | None = None
|
|
118
|
-
framework: str | None = None
|
|
119
|
-
version: str | None = None
|
|
120
|
-
tool_script: str | None = None
|
|
121
|
-
tool_file: str | None = None
|
|
122
|
-
tags: str | list[str] | None = None
|
|
123
|
-
_client: Any = None # Will hold client reference
|
|
124
|
-
|
|
125
|
-
def _set_client(self, client: Any) -> "Tool":
|
|
126
|
-
"""Set the client reference for this resource."""
|
|
127
|
-
self._client = client
|
|
128
|
-
return self
|
|
129
|
-
|
|
130
|
-
def get_script(self) -> str:
|
|
131
|
-
"""Get the tool script content."""
|
|
132
|
-
if self.tool_script:
|
|
133
|
-
return self.tool_script
|
|
134
|
-
elif self.tool_file:
|
|
135
|
-
return f"Script content from file: {self.tool_file}"
|
|
136
|
-
else:
|
|
137
|
-
return "No script content available"
|
|
138
|
-
|
|
139
|
-
def update(self, **kwargs) -> "Tool":
|
|
140
|
-
"""Update tool attributes.
|
|
141
|
-
|
|
142
|
-
Supports both metadata updates and file uploads.
|
|
143
|
-
Pass 'file' parameter to update tool code via file upload.
|
|
144
|
-
"""
|
|
145
|
-
if not self._client:
|
|
146
|
-
raise RuntimeError(
|
|
147
|
-
"No client available. Use client.get_tool_by_id() to get a client-connected tool."
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
# Check if file upload is requested
|
|
151
|
-
if "file" in kwargs:
|
|
152
|
-
file_path = kwargs.pop("file") # Remove file from kwargs for metadata
|
|
153
|
-
updated_tool = self._client.tools.update_tool_via_file(
|
|
154
|
-
self.id, file_path, **kwargs
|
|
155
|
-
)
|
|
156
|
-
else:
|
|
157
|
-
# Regular metadata update
|
|
158
|
-
updated_tool = self._client.tools.update_tool(self.id, **kwargs)
|
|
159
|
-
|
|
160
|
-
# Update current instance with new data
|
|
161
|
-
for key, value in updated_tool.model_dump().items():
|
|
162
|
-
if hasattr(self, key):
|
|
163
|
-
setattr(self, key, value)
|
|
164
|
-
return self
|
|
165
|
-
|
|
166
|
-
def delete(self) -> None:
|
|
167
|
-
"""Delete the tool."""
|
|
168
|
-
if not self._client:
|
|
169
|
-
raise RuntimeError(
|
|
170
|
-
"No client available. Use client.get_tool_by_id() to get a client-connected tool."
|
|
171
|
-
)
|
|
172
|
-
self._client.delete_tool(self.id)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
class MCP(BaseModel):
|
|
176
|
-
"""MCP model for API responses."""
|
|
177
|
-
|
|
178
|
-
id: str
|
|
179
|
-
name: str
|
|
180
|
-
description: str | None = None
|
|
181
|
-
config: dict[str, Any] | None = None
|
|
182
|
-
framework: str | None = None
|
|
183
|
-
version: str | None = None
|
|
184
|
-
transport: str | None = None # "sse" or "http"
|
|
185
|
-
authentication: dict[str, Any] | None = None
|
|
186
|
-
metadata: dict[str, Any] | None = None
|
|
187
|
-
_client: Any = None # Will hold client reference
|
|
188
|
-
|
|
189
|
-
def _set_client(self, client: Any) -> "MCP":
|
|
190
|
-
"""Set the client reference for this resource."""
|
|
191
|
-
self._client = client
|
|
192
|
-
return self
|
|
193
|
-
|
|
194
|
-
def get_tools(self) -> list[dict[str, Any]]:
|
|
195
|
-
"""Get tools available from this MCP."""
|
|
196
|
-
if not self._client:
|
|
197
|
-
raise RuntimeError(
|
|
198
|
-
"No client available. Use client.get_mcp_by_id() to get a client-connected MCP."
|
|
199
|
-
)
|
|
200
|
-
# This would delegate to the client's MCP tools endpoint
|
|
201
|
-
# For now, return empty list as placeholder
|
|
202
|
-
return []
|
|
203
|
-
|
|
204
|
-
def update(self, **kwargs) -> "MCP":
|
|
205
|
-
"""Update MCP attributes."""
|
|
206
|
-
if not self._client:
|
|
207
|
-
raise RuntimeError(
|
|
208
|
-
"No client available. Use client.get_mcp_by_id() to get a client-connected MCP."
|
|
209
|
-
)
|
|
210
|
-
updated_mcp = self._client.update_mcp(self.id, **kwargs)
|
|
211
|
-
# Update current instance with new data
|
|
212
|
-
for key, value in updated_mcp.model_dump().items():
|
|
213
|
-
if hasattr(self, key):
|
|
214
|
-
setattr(self, key, value)
|
|
215
|
-
return self
|
|
216
|
-
|
|
217
|
-
def delete(self) -> None:
|
|
218
|
-
"""Delete the MCP."""
|
|
219
|
-
if not self._client:
|
|
220
|
-
raise RuntimeError(
|
|
221
|
-
"No client available. Use client.get_mcp_by_id() to get a client-connected MCP."
|
|
222
|
-
)
|
|
223
|
-
self._client.delete_mcp(self.id)
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
class LanguageModelResponse(BaseModel):
|
|
227
|
-
"""Language model response model."""
|
|
228
|
-
|
|
229
|
-
name: str
|
|
230
|
-
provider: str
|
|
231
|
-
description: str | None = None
|
|
232
|
-
capabilities: list[str] | None = None
|
|
233
|
-
max_tokens: int | None = None
|
|
234
|
-
supports_streaming: bool = False
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
class TTYRenderer:
|
|
238
|
-
"""Simple TTY renderer for non-Rich environments."""
|
|
239
|
-
|
|
240
|
-
def __init__(self, use_color: bool = True):
|
|
241
|
-
self.use_color = use_color
|
|
242
|
-
|
|
243
|
-
def render_message(self, message: str, event_type: str = "message") -> None:
|
|
244
|
-
"""Render a message with optional color."""
|
|
245
|
-
if event_type == "error":
|
|
246
|
-
print(f"ERROR: {message}", flush=True)
|
|
247
|
-
elif event_type == "done":
|
|
248
|
-
print(f"\n✅ {message}", flush=True)
|
|
249
|
-
else:
|
|
250
|
-
print(message, flush=True)
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"""Progress and timing utilities for the renderer package.
|
|
2
|
-
|
|
3
|
-
Authors:
|
|
4
|
-
Raymond Christopher (raymond.christopher@gdplabs.id)
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
from time import monotonic
|
|
10
|
-
|
|
11
|
-
from glaip_sdk.utils.rendering.formatting import get_spinner_char
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def get_spinner() -> str:
|
|
15
|
-
"""Return the current animated spinner character for visual feedback."""
|
|
16
|
-
return get_spinner_char()
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def format_working_indicator(
|
|
20
|
-
started_at: float | None,
|
|
21
|
-
server_elapsed_time: float | None = None,
|
|
22
|
-
streaming_started_at: float | None = None,
|
|
23
|
-
) -> str:
|
|
24
|
-
"""Format a working indicator with elapsed time.
|
|
25
|
-
|
|
26
|
-
Args:
|
|
27
|
-
started_at: Timestamp when work started, or None
|
|
28
|
-
server_elapsed_time: Server-reported elapsed time if available
|
|
29
|
-
streaming_started_at: When streaming started
|
|
30
|
-
|
|
31
|
-
Returns:
|
|
32
|
-
Formatted working indicator string with elapsed time
|
|
33
|
-
"""
|
|
34
|
-
chip = "Working..."
|
|
35
|
-
|
|
36
|
-
# Use server timing if available (more accurate)
|
|
37
|
-
if server_elapsed_time is not None and streaming_started_at is not None:
|
|
38
|
-
elapsed = server_elapsed_time
|
|
39
|
-
elif started_at:
|
|
40
|
-
try:
|
|
41
|
-
elapsed = monotonic() - started_at
|
|
42
|
-
except Exception:
|
|
43
|
-
return chip
|
|
44
|
-
else:
|
|
45
|
-
return chip
|
|
46
|
-
|
|
47
|
-
if elapsed >= 1:
|
|
48
|
-
chip = f"Working... ({elapsed:.2f}s)"
|
|
49
|
-
else:
|
|
50
|
-
elapsed_ms = int(elapsed * 1000)
|
|
51
|
-
chip = f"Working... ({elapsed_ms}ms)" if elapsed_ms > 0 else "Working... (<1ms)"
|
|
52
|
-
return chip
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def format_elapsed_time(elapsed_seconds: float) -> str:
|
|
56
|
-
"""Format elapsed time in a human-readable format.
|
|
57
|
-
|
|
58
|
-
Args:
|
|
59
|
-
elapsed_seconds: Time in seconds
|
|
60
|
-
|
|
61
|
-
Returns:
|
|
62
|
-
Formatted time string
|
|
63
|
-
"""
|
|
64
|
-
if elapsed_seconds >= 60:
|
|
65
|
-
minutes = int(elapsed_seconds // 60)
|
|
66
|
-
seconds = elapsed_seconds % 60
|
|
67
|
-
return f"{minutes}m {seconds:.1f}s"
|
|
68
|
-
elif elapsed_seconds >= 1:
|
|
69
|
-
return f"{elapsed_seconds:.2f}s"
|
|
70
|
-
else:
|
|
71
|
-
ms = int(elapsed_seconds * 1000)
|
|
72
|
-
return f"{ms}ms" if ms > 0 else "<1ms"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def is_delegation_tool(tool_name: str) -> bool:
|
|
76
|
-
"""Check if a tool name indicates delegation functionality.
|
|
77
|
-
|
|
78
|
-
Args:
|
|
79
|
-
tool_name: The name of the tool to check
|
|
80
|
-
|
|
81
|
-
Returns:
|
|
82
|
-
True if this is a delegation tool
|
|
83
|
-
"""
|
|
84
|
-
return (
|
|
85
|
-
tool_name.startswith("delegate_to_")
|
|
86
|
-
or tool_name.startswith("delegate_")
|
|
87
|
-
or "sub_agent" in tool_name.lower()
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
def format_tool_title(tool_name: str) -> str:
|
|
92
|
-
"""Format tool name for panel title display.
|
|
93
|
-
|
|
94
|
-
Args:
|
|
95
|
-
tool_name: The full tool name (may include file paths)
|
|
96
|
-
|
|
97
|
-
Returns:
|
|
98
|
-
Formatted title string suitable for panel display
|
|
99
|
-
"""
|
|
100
|
-
# Check if this is a delegation tool
|
|
101
|
-
if is_delegation_tool(tool_name):
|
|
102
|
-
# Extract the sub-agent name from delegation tool names
|
|
103
|
-
if tool_name.startswith("delegate_to_"):
|
|
104
|
-
sub_agent_name = tool_name.replace("delegate_to_", "")
|
|
105
|
-
return f"Sub-Agent: {sub_agent_name}"
|
|
106
|
-
elif tool_name.startswith("delegate_"):
|
|
107
|
-
sub_agent_name = tool_name.replace("delegate_", "")
|
|
108
|
-
return f"Sub-Agent: {sub_agent_name}"
|
|
109
|
-
|
|
110
|
-
# For regular tools, clean up the name
|
|
111
|
-
# Remove file path prefixes if present
|
|
112
|
-
if "/" in tool_name:
|
|
113
|
-
tool_name = tool_name.split("/")[-1]
|
|
114
|
-
if "." in tool_name:
|
|
115
|
-
tool_name = tool_name.split(".")[0]
|
|
116
|
-
|
|
117
|
-
# Convert snake_case to Title Case
|
|
118
|
-
return tool_name.replace("_", " ").title()
|