|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | 5 | import asyncio |
6 | | -from typing import Dict, Mapping, Optional |
| 6 | +from typing import Dict, List, Mapping, Optional |
7 | 7 | from pathlib import Path |
8 | 8 | from datetime import timedelta |
9 | 9 | from typing_extensions import Unpack |
|
27 | 27 | SDKBenchmarkListParams, |
28 | 28 | SDKBlueprintListParams, |
29 | 29 | SDKMcpConfigListParams, |
| 30 | + SDKAgentListPublicParams, |
30 | 31 | SDKBenchmarkCreateParams, |
31 | 32 | SDKBlueprintCreateParams, |
32 | 33 | SDKMcpConfigCreateParams, |
|
57 | 58 | from .async_storage_object import AsyncStorageObject |
58 | 59 | from .async_scenario_builder import AsyncScenarioBuilder |
59 | 60 | from ..types.object_create_params import ContentType |
| 61 | +from ..types.agent_devbox_counts_view import AgentDevboxCountsView |
60 | 62 | from ..types.shared_params.agent_source import Git, Npm, Pip, Object |
61 | 63 |
|
62 | 64 |
|
@@ -805,6 +807,35 @@ async def list( |
805 | 807 | ) |
806 | 808 | return [AsyncAgent(self._client, item.id, item) for item in page.agents] |
807 | 809 |
|
| 810 | + async def list_public( |
| 811 | + self, |
| 812 | + **params: Unpack[SDKAgentListPublicParams], |
| 813 | + ) -> List[AsyncAgent]: |
| 814 | + """List public agents. |
| 815 | +
|
| 816 | + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKAgentListPublicParams` for available parameters |
| 817 | + :return: Collection of public agent wrappers |
| 818 | + :rtype: list[AsyncAgent] |
| 819 | + """ |
| 820 | + page = await self._client.agents.list_public( |
| 821 | + **params, |
| 822 | + ) |
| 823 | + return [AsyncAgent(self._client, item.id, item) for item in page.agents] |
| 824 | + |
| 825 | + async def devbox_counts( |
| 826 | + self, |
| 827 | + **options: Unpack[BaseRequestOptions], |
| 828 | + ) -> AgentDevboxCountsView: |
| 829 | + """Get devbox counts grouped by agent name. |
| 830 | +
|
| 831 | + :param options: Optional request configuration |
| 832 | + :return: Devbox counts per agent name and total |
| 833 | + :rtype: AgentDevboxCountsView |
| 834 | + """ |
| 835 | + return await self._client.agents.devbox_counts( |
| 836 | + **options, |
| 837 | + ) |
| 838 | + |
808 | 839 |
|
809 | 840 | class AsyncScenarioOps: |
810 | 841 | """Manage scenarios (async). Access via ``runloop.scenario``. |
|
0 commit comments