agentscope-runtime 0.1.0__py3-none-any.whl → 0.1.1__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.
- agentscope_runtime/engine/agents/agentscope_agent/agent.py +1 -0
- agentscope_runtime/engine/agents/agno_agent.py +1 -0
- agentscope_runtime/engine/agents/autogen_agent.py +245 -0
- agentscope_runtime/engine/schemas/agent_schemas.py +1 -1
- agentscope_runtime/engine/services/memory_service.py +2 -2
- agentscope_runtime/engine/services/redis_memory_service.py +187 -0
- agentscope_runtime/engine/services/redis_session_history_service.py +155 -0
- agentscope_runtime/sandbox/build.py +1 -1
- agentscope_runtime/sandbox/custom/custom_sandbox.py +0 -1
- agentscope_runtime/sandbox/custom/example.py +0 -1
- agentscope_runtime/sandbox/manager/container_clients/__init__.py +2 -0
- agentscope_runtime/sandbox/manager/container_clients/docker_client.py +246 -4
- agentscope_runtime/sandbox/manager/container_clients/kubernetes_client.py +550 -0
- agentscope_runtime/sandbox/manager/sandbox_manager.py +21 -82
- agentscope_runtime/sandbox/manager/server/app.py +55 -24
- agentscope_runtime/sandbox/manager/server/config.py +28 -16
- agentscope_runtime/sandbox/model/container.py +3 -1
- agentscope_runtime/sandbox/model/manager_config.py +19 -2
- agentscope_runtime/sandbox/tools/tool.py +111 -0
- agentscope_runtime/version.py +1 -1
- {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/METADATA +74 -13
- {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/RECORD +26 -23
- agentscope_runtime/sandbox/manager/utils.py +0 -78
- {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/WHEEL +0 -0
- {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/entry_points.txt +0 -0
- {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentscope-runtime
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A production-ready runtime framework for agent applications, providing secure sandboxed execution environments and scalable deployment solutions with multi-framework support.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -17,14 +17,18 @@ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
|
17
17
|
Requires-Dist: pre-commit>=4.2.0; extra == "dev"
|
|
18
18
|
Requires-Dist: jupyter-book>=1.0.4.post1; extra == "dev"
|
|
19
19
|
Requires-Dist: furo>=2025.7.19; extra == "dev"
|
|
20
|
+
Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
|
|
21
|
+
Requires-Dist: fakeredis>=2.31.0; extra == "dev"
|
|
22
|
+
Requires-Dist: sphinx-autoapi>=3.6.0; extra == "dev"
|
|
20
23
|
Provides-Extra: sandbox
|
|
21
24
|
Requires-Dist: docker>=7.1.0; extra == "sandbox"
|
|
22
25
|
Requires-Dist: steel-sdk>=0.1.0; extra == "sandbox"
|
|
23
26
|
Requires-Dist: redis>=6.0.0b2; extra == "sandbox"
|
|
24
27
|
Requires-Dist: oss2>=2.19.1; extra == "sandbox"
|
|
25
|
-
Requires-Dist: requests>=2.32.4; extra == "sandbox"
|
|
26
28
|
Requires-Dist: pydantic-settings>=2.9.1; extra == "sandbox"
|
|
27
29
|
Requires-Dist: dotenv>=0.9.9; extra == "sandbox"
|
|
30
|
+
Requires-Dist: kubernetes>=33.1.0; extra == "sandbox"
|
|
31
|
+
Requires-Dist: shortuuid>=1.0.13; extra == "sandbox"
|
|
28
32
|
Provides-Extra: agentscope
|
|
29
33
|
Requires-Dist: agentscope==1.0.0; extra == "agentscope"
|
|
30
34
|
Provides-Extra: langgraph
|
|
@@ -33,17 +37,30 @@ Provides-Extra: agno
|
|
|
33
37
|
Requires-Dist: agno>=1.7.5; extra == "agno"
|
|
34
38
|
Provides-Extra: a2a
|
|
35
39
|
Requires-Dist: a2a-sdk>=0.3.0; extra == "a2a"
|
|
40
|
+
Provides-Extra: autogen
|
|
41
|
+
Requires-Dist: autogen-agentchat>=0.7.4; extra == "autogen"
|
|
42
|
+
Requires-Dist: autogen-ext[openai]>=0.7.4; extra == "autogen"
|
|
36
43
|
Dynamic: license-file
|
|
37
44
|
|
|
38
45
|
<div align="center">
|
|
39
46
|
|
|
40
47
|
# AgentScope Runtime
|
|
41
48
|
|
|
42
|
-
[](https://pypi.org/project/agentscope-runtime/)
|
|
50
|
+
[](https://python.org)
|
|
51
|
+
[](LICENSE)
|
|
52
|
+
[](https://github.com/psf/black)
|
|
53
|
+
[](https://github.com/agentscope-ai/agentscope-runtime/stargazers)
|
|
54
|
+
[](https://github.com/agentscope-ai/agentscope-runtime/network)
|
|
55
|
+
[](https://github.com/agentscope-ai/agentscope-runtime/actions)
|
|
56
|
+
[](https://runtime.agentscope.io)
|
|
57
|
+
[](https://deepwiki.com/agentscope-ai/agentscope-runtime)
|
|
58
|
+
[](https://a2a-protocol.org/)
|
|
59
|
+
[](https://modelcontextprotocol.io/)
|
|
60
|
+
[](https://discord.gg/eYMpfnkG8h)
|
|
61
|
+
[](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11)
|
|
62
|
+
|
|
63
|
+
[[Cookbook]](https://runtime.agentscope.io/)
|
|
47
64
|
[[中文README]](README_zh.md)
|
|
48
65
|
|
|
49
66
|
**A Production-Ready Runtime Framework for Intelligent Agent Applications**
|
|
@@ -81,7 +98,7 @@ Welcome to join our community on
|
|
|
81
98
|
|
|
82
99
|
- [🚀 Quick Start](#-quick-start)
|
|
83
100
|
- [📚 Cookbook](#-cookbook)
|
|
84
|
-
- [🔌Agent Framework Integration](#-agent-framework-integration)
|
|
101
|
+
- [🔌 Agent Framework Integration](#-agent-framework-integration)
|
|
85
102
|
- [🏗️ Deployment](#️-deployment)
|
|
86
103
|
- [🤝 Contributing](#-contributing)
|
|
87
104
|
- [📄 License](#-license)
|
|
@@ -96,14 +113,30 @@ Welcome to join our community on
|
|
|
96
113
|
|
|
97
114
|
### Installation
|
|
98
115
|
|
|
116
|
+
From PyPI:
|
|
117
|
+
|
|
99
118
|
```bash
|
|
100
|
-
# Install dependencies
|
|
119
|
+
# Install core dependencies
|
|
101
120
|
pip install agentscope-runtime
|
|
102
121
|
|
|
103
122
|
# Install sandbox dependencies
|
|
104
123
|
pip install "agentscope-runtime[sandbox]"
|
|
105
124
|
```
|
|
106
125
|
|
|
126
|
+
(Optional) From source:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Pull the source code from GitHub
|
|
130
|
+
git clone -b main https://github.com/agentscope-ai/agentscope-runtime.git
|
|
131
|
+
cd agentscope-runtime
|
|
132
|
+
|
|
133
|
+
# Install core dependencies
|
|
134
|
+
pip install -e .
|
|
135
|
+
|
|
136
|
+
# Install sandbox dependencies
|
|
137
|
+
pip install -e ".[sandbox]"
|
|
138
|
+
```
|
|
139
|
+
|
|
107
140
|
### Basic Agent Usage Example
|
|
108
141
|
|
|
109
142
|
This example demonstrates how to create a simple LLM agent using AgentScope Runtime and stream responses from the Qwen model.
|
|
@@ -164,14 +197,19 @@ with BaseSandbox() as box:
|
|
|
164
197
|
print(box.run_shell_command(command="echo hello"))
|
|
165
198
|
```
|
|
166
199
|
|
|
200
|
+
> [!NOTE]
|
|
201
|
+
>
|
|
202
|
+
> Current version requires Docker or Kubernetes to be installed and running on your system. Please refer to [this tutorial](https://runtime.agentscope.io/en/sandbox.html) for more details.
|
|
203
|
+
|
|
167
204
|
---
|
|
168
205
|
|
|
169
206
|
## 📚 Cookbook
|
|
170
207
|
|
|
171
|
-
- **[📖 Cookbook](/
|
|
172
|
-
- **[💡 Concept](/
|
|
173
|
-
- **[🚀 Quick Start](/
|
|
174
|
-
- **[🏠 Demo House](/
|
|
208
|
+
- **[📖 Cookbook](https://runtime.agentscope.io/en/intro.html)**: Comprehensive tutorials
|
|
209
|
+
- **[💡 Concept](https://runtime.agentscope.io/en/concept.html)**: Core concepts and architecture overview
|
|
210
|
+
- **[🚀 Quick Start](https://runtime.agentscope.io/en/quickstart.html)**: Quick start tutorial
|
|
211
|
+
- **[🏠 Demo House](https://runtime.agentscope.io/en/demohouse.html)**: Rich example projects
|
|
212
|
+
- **[📋 API Reference](https://runtime.agentscope.io/en/api/index.html)**: Complete API documentation
|
|
175
213
|
|
|
176
214
|
---
|
|
177
215
|
|
|
@@ -180,6 +218,7 @@ with BaseSandbox() as box:
|
|
|
180
218
|
### AgentScope Integration
|
|
181
219
|
|
|
182
220
|
```python
|
|
221
|
+
# pip install "agentscope-runtime[agentscope]"
|
|
183
222
|
import os
|
|
184
223
|
|
|
185
224
|
from agentscope.agent import ReActAgent
|
|
@@ -202,6 +241,7 @@ agent = AgentScopeAgent(
|
|
|
202
241
|
### Agno Integration
|
|
203
242
|
|
|
204
243
|
```python
|
|
244
|
+
# pip install "agentscope-runtime[agno]"
|
|
205
245
|
from agno.agent import Agent
|
|
206
246
|
from agno.models.openai import OpenAIChat
|
|
207
247
|
from agentscope_runtime.engine.agents.agno_agent import AgnoAgent
|
|
@@ -218,9 +258,30 @@ agent = AgnoAgent(
|
|
|
218
258
|
)
|
|
219
259
|
```
|
|
220
260
|
|
|
261
|
+
### AutoGen Integration
|
|
262
|
+
|
|
263
|
+
```python
|
|
264
|
+
# pip install "agentscope-runtime[autogen]"
|
|
265
|
+
from autogen_agentchat.agents import AssistantAgent
|
|
266
|
+
from autogen_ext.models.openai import OpenAIChatCompletionClient
|
|
267
|
+
from agentscope_runtime.engine.agents.autogen_agent import AutogenAgent
|
|
268
|
+
|
|
269
|
+
agent = AutogenAgent(
|
|
270
|
+
name="Friday",
|
|
271
|
+
model=OpenAIChatCompletionClient(
|
|
272
|
+
model="gpt-4",
|
|
273
|
+
),
|
|
274
|
+
agent_config={
|
|
275
|
+
"system_message": "You're a helpful assistant",
|
|
276
|
+
},
|
|
277
|
+
agent_builder=AssistantAgent,
|
|
278
|
+
)
|
|
279
|
+
```
|
|
280
|
+
|
|
221
281
|
### LangGraph Integration
|
|
222
282
|
|
|
223
283
|
```python
|
|
284
|
+
# pip install "agentscope-runtime[langgraph]"
|
|
224
285
|
from typing import TypedDict
|
|
225
286
|
from langgraph import graph, types
|
|
226
287
|
from agentscope_runtime.engine.agents.langgraph_agent import LangGraphAgent
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
agentscope_runtime/__init__.py,sha256=LMAUeUpPo2qzqh3zyZ-JJwc8GrsiT9b-yNhQMxlKmfE,84
|
|
2
|
-
agentscope_runtime/version.py,sha256=
|
|
2
|
+
agentscope_runtime/version.py,sha256=sf_U_KpZOWry0TU96guIQr490ZmITtjm4obgpWMHumM,47
|
|
3
3
|
agentscope_runtime/engine/__init__.py,sha256=jsvYM1LlZVP4EFzsE5uu5ycgBU9CVnug7UyTzBmpX5g,213
|
|
4
4
|
agentscope_runtime/engine/runner.py,sha256=HhOjfAgao-b5vzSZh6pckVhx0K32qs868dvRE3Z56TA,5686
|
|
5
5
|
agentscope_runtime/engine/agents/__init__.py,sha256=xHp7FY6QM-nAhQAECi7xzrJkRkYZpAa5_zHRhO6Zogc,54
|
|
6
|
-
agentscope_runtime/engine/agents/agno_agent.py,sha256=
|
|
6
|
+
agentscope_runtime/engine/agents/agno_agent.py,sha256=c2f575gc5ZOWGvrdjObo7IGSbM1Si0JQGxKpqtMSf14,6716
|
|
7
|
+
agentscope_runtime/engine/agents/autogen_agent.py,sha256=HbtvN8554FnkgMHX418sMgIM-hp7OVCUR2YJybRMKxI,7693
|
|
7
8
|
agentscope_runtime/engine/agents/base_agent.py,sha256=fGf4MNKmfm_fsU2orTPLpt7TT5HkZZZYR05rhp5s7-E,782
|
|
8
9
|
agentscope_runtime/engine/agents/langgraph_agent.py,sha256=05Z5js7g9Dxy-MWj0W00jOtFMNnHzSPjlP3WIIVHTtQ,1416
|
|
9
10
|
agentscope_runtime/engine/agents/llm_agent.py,sha256=0hG_FRtAxmlljmI51GT7ui_7wjjHO03wckx9bNKra8Y,1356
|
|
10
11
|
agentscope_runtime/engine/agents/agentscope_agent/__init__.py,sha256=lt1NJEDuBWaX1n-bqMbQR6Uol7-fFUuyeuHy8FQrzWk,97
|
|
11
|
-
agentscope_runtime/engine/agents/agentscope_agent/agent.py,sha256=
|
|
12
|
+
agentscope_runtime/engine/agents/agentscope_agent/agent.py,sha256=Tp3OJi0r8aU1juXKF8fT9dCfaL2w3_sqQcSBuThndUM,11983
|
|
12
13
|
agentscope_runtime/engine/agents/agentscope_agent/hooks.py,sha256=iX2xY3UDtiC1ilzvyHL4kLWKB4xH-iQ4o3erh5HVpXo,5444
|
|
13
14
|
agentscope_runtime/engine/deployers/__init__.py,sha256=2eUo6uvloMt4AstmalkwcBgR7gPyppNqlmjld0Ztpxk,103
|
|
14
15
|
agentscope_runtime/engine/deployers/base.py,sha256=0bb3zQiVE1jTMG0NCsjhcSeP7lhnbn1KPQRx1H5hues,494
|
|
@@ -25,14 +26,16 @@ agentscope_runtime/engine/llms/base_llm.py,sha256=Vvxlqom35qaSLYSyyh3hj-XsoyFxcf
|
|
|
25
26
|
agentscope_runtime/engine/llms/qwen_llm.py,sha256=_J-PpwSrKNSmQzO6KNzJlMd5t4m47YVKXp0fl-KYQmA,1271
|
|
26
27
|
agentscope_runtime/engine/misc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
28
|
agentscope_runtime/engine/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
agentscope_runtime/engine/schemas/agent_schemas.py,sha256=
|
|
29
|
+
agentscope_runtime/engine/schemas/agent_schemas.py,sha256=N4uPXeL6v6lrCy7EiFo02VbvxgfYv-2fNFAqwU1ohoI,14663
|
|
29
30
|
agentscope_runtime/engine/schemas/context.py,sha256=Qd2ee4HCYNmD5VHsacrScdpNq8q2aJwsRtsrBZarI9M,1550
|
|
30
31
|
agentscope_runtime/engine/services/__init__.py,sha256=SAsmwIr8etoUbqz5W1K2pH5ONlFzooXMQ0UFXTXfHwM,271
|
|
31
32
|
agentscope_runtime/engine/services/base.py,sha256=g2hTc3ivj2MPjnsu5_09m6_MZ3KDHBfiYKu4F2pLA1I,2096
|
|
32
33
|
agentscope_runtime/engine/services/context_manager.py,sha256=PaGeq_uK1DqOb75ViMGO_qP32W2vnw70uwY-FP1bubs,4058
|
|
33
34
|
agentscope_runtime/engine/services/environment_manager.py,sha256=Bd3vmgX5KkN9gTY60o7Pozpsw0S8etpSJns63woSlDU,1347
|
|
34
35
|
agentscope_runtime/engine/services/manager.py,sha256=r-TcHti8sEMXjZbwPWlG32J8iiMHUXuUJmAiwPvgn_Q,6282
|
|
35
|
-
agentscope_runtime/engine/services/memory_service.py,sha256=
|
|
36
|
+
agentscope_runtime/engine/services/memory_service.py,sha256=EHsvNPMXsH1B8LZY0zZKzYMvDHzaP18edKv9uimM98k,7889
|
|
37
|
+
agentscope_runtime/engine/services/redis_memory_service.py,sha256=2A6ouYghs80jby_MUcwiKfCScmYUbIcYsMlmEMynuqg,5708
|
|
38
|
+
agentscope_runtime/engine/services/redis_session_history_service.py,sha256=Zo7H0QtUZRKXh07JHcvtZfmEqbmidEsTGkhGfk1aLQE,5042
|
|
36
39
|
agentscope_runtime/engine/services/sandbox_service.py,sha256=IzVg5BtDEfqFrVy7SnE3GDYXVXc0jzv9XIl0mFYHWDk,6082
|
|
37
40
|
agentscope_runtime/engine/services/session_history_service.py,sha256=CLDMHNja6k7VrTQMkQDf24uP-aSGV5sdBjG5A0t_c64,8044
|
|
38
41
|
agentscope_runtime/engine/tracing/__init__.py,sha256=DuM6Zp_IJ-ixgTTomtrMbpcYiMJOHMrJHwKIqcLzrfA,1133
|
|
@@ -41,7 +44,7 @@ agentscope_runtime/engine/tracing/local_logging_handler.py,sha256=LP-2NX7kRPhEN-
|
|
|
41
44
|
agentscope_runtime/engine/tracing/tracing_metric.py,sha256=3qHqBRiTWijqBPLchxyERfPZCstTo8Y5LuL-eCuQas0,2115
|
|
42
45
|
agentscope_runtime/engine/tracing/wrapper.py,sha256=ioeKSRJDJgcW34OfFmAq7vgE0FNEFXa_4QLSf7kUBfU,11236
|
|
43
46
|
agentscope_runtime/sandbox/__init__.py,sha256=39NF3OdrBoUOje8gHI--cIgLMfY3ojm0JWYmGsEiWFU,378
|
|
44
|
-
agentscope_runtime/sandbox/build.py,sha256=
|
|
47
|
+
agentscope_runtime/sandbox/build.py,sha256=rhcsHbDkcQgS4Hxv8z2Lsjp3LnheQyCCTbm3rkv80Tw,6439
|
|
45
48
|
agentscope_runtime/sandbox/constant.py,sha256=-CaSZkDPO2XQ70-PVymu4Z5Y7hlvdpPJ3zgP27MLvik,156
|
|
46
49
|
agentscope_runtime/sandbox/enums.py,sha256=_2I1pl6sxNKYtxEwqDpJ43ZOP-Y4yWScBNbDLn5_d3A,1838
|
|
47
50
|
agentscope_runtime/sandbox/mcp_server.py,sha256=UT3aRZqyeHqEhhm-wZ0Ilhew3eDMHzz9DCN6Qb-eKFk,6012
|
|
@@ -81,11 +84,10 @@ agentscope_runtime/sandbox/client/__init__.py,sha256=KiNsTToc1jICqCC1BcH762jZgHu
|
|
|
81
84
|
agentscope_runtime/sandbox/client/http_client.py,sha256=YqITjeq4fySWSDr39DAG80NpRfD0--Ndupr7hMqL7RA,17954
|
|
82
85
|
agentscope_runtime/sandbox/client/training_client.py,sha256=MYfI06MeyIelwjY4QllVL4exhSCMNpdMudGi2ctVL28,7675
|
|
83
86
|
agentscope_runtime/sandbox/custom/__init__.py,sha256=wpu0DlzdLohYzOVM9yZloIWid3w_ME6dPtOjCZKbRZ8,463
|
|
84
|
-
agentscope_runtime/sandbox/custom/custom_sandbox.py,sha256=
|
|
85
|
-
agentscope_runtime/sandbox/custom/example.py,sha256=
|
|
87
|
+
agentscope_runtime/sandbox/custom/custom_sandbox.py,sha256=2-HZRUlZcvv-YZh9NrHBByKamhVowwZ_drGJSAwKM8c,971
|
|
88
|
+
agentscope_runtime/sandbox/custom/example.py,sha256=ycKmuUHghmPTUYfEQW0AyG5SHt1Ggf3_NlAP5Z6OZAQ,931
|
|
86
89
|
agentscope_runtime/sandbox/manager/__init__.py,sha256=KNHc1uDaUWBH_ZnWjH5NHRBiQM_zDyi9B2xKVNtAWIg,98
|
|
87
|
-
agentscope_runtime/sandbox/manager/sandbox_manager.py,sha256=
|
|
88
|
-
agentscope_runtime/sandbox/manager/utils.py,sha256=c_Zicb8xnkp7UoPC9SN29m2H7mvREFbCExBM_8sU_Ug,1977
|
|
90
|
+
agentscope_runtime/sandbox/manager/sandbox_manager.py,sha256=LTaWUIerNb3xHfKe78j5T-CtYu2VFsp4NUicK-TQwMc,21276
|
|
89
91
|
agentscope_runtime/sandbox/manager/collections/__init__.py,sha256=teQPF7huMB2yEX_CAFsmIJhQxH7ldHR7gr11W3jlx4o,582
|
|
90
92
|
agentscope_runtime/sandbox/manager/collections/base_mapping.py,sha256=IIVNwvaGVAiL6XxV0LvUHx-JmDvUc19iOGyRyAccMaI,361
|
|
91
93
|
agentscope_runtime/sandbox/manager/collections/base_queue.py,sha256=eCwb5eovwzSV83J_Nq3HX_4IQ8rjYw9wdeVRS5sRQHA,424
|
|
@@ -96,12 +98,13 @@ agentscope_runtime/sandbox/manager/collections/in_memory_set.py,sha256=7qek5ZB3f
|
|
|
96
98
|
agentscope_runtime/sandbox/manager/collections/redis_mapping.py,sha256=CmI_C83gQlbnZWz3vwFe5rySXxND11JnB8-iZbNooxo,688
|
|
97
99
|
agentscope_runtime/sandbox/manager/collections/redis_queue.py,sha256=4MCIDs7SgSfdngTvqxWWv2H-8XTpFQOmXG4-fxN20ew,792
|
|
98
100
|
agentscope_runtime/sandbox/manager/collections/redis_set.py,sha256=eRCnMXc4hcDF2qyxFiNnrn2o4QjvtgDb6rEcblmV1o8,654
|
|
99
|
-
agentscope_runtime/sandbox/manager/container_clients/__init__.py,sha256=
|
|
101
|
+
agentscope_runtime/sandbox/manager/container_clients/__init__.py,sha256=G5TTwLv_UgWUDwtwr6oohJXuGW3gAwxmgD1VhZH3zs8,225
|
|
100
102
|
agentscope_runtime/sandbox/manager/container_clients/base_client.py,sha256=_uvxRh65lbMNXDcHjq01aYuNUrcxRlNzRtRIPMgWFGc,992
|
|
101
|
-
agentscope_runtime/sandbox/manager/container_clients/docker_client.py,sha256=
|
|
103
|
+
agentscope_runtime/sandbox/manager/container_clients/docker_client.py,sha256=fyxJNlDEPwd7aXdW_lsOSTLGjLrP_hJ0f_kvgD83aCo,13055
|
|
104
|
+
agentscope_runtime/sandbox/manager/container_clients/kubernetes_client.py,sha256=WBIuL9PC-sblg5UsB2CZdPEeT5F9VTSLktprpJ1YddA,19114
|
|
102
105
|
agentscope_runtime/sandbox/manager/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
103
|
-
agentscope_runtime/sandbox/manager/server/app.py,sha256=
|
|
104
|
-
agentscope_runtime/sandbox/manager/server/config.py,sha256=
|
|
106
|
+
agentscope_runtime/sandbox/manager/server/app.py,sha256=b2Yot9anNtYjommDLS8OxKUI-EPaw4DGMCiZM0C0DHE,6808
|
|
107
|
+
agentscope_runtime/sandbox/manager/server/config.py,sha256=rIRKI_GHmyt3Wty_ujUya_vSw_ij-rRkerqiQPG_yzU,2423
|
|
105
108
|
agentscope_runtime/sandbox/manager/server/models.py,sha256=rCibF0HsotFcqsQVTSUoOTJCFQU3oqKvpOiWMWIRLyY,304
|
|
106
109
|
agentscope_runtime/sandbox/manager/storage/__init__.py,sha256=jGmpfXV1E2X7AqkGeF1xu1EHiSTvbH3TSIviLbKBFh4,210
|
|
107
110
|
agentscope_runtime/sandbox/manager/storage/data_storage.py,sha256=mGwf7LYbp_fRjLN9BZay6cm3eNziEdU6OlSBeFnIBMQ,475
|
|
@@ -109,13 +112,13 @@ agentscope_runtime/sandbox/manager/storage/local_storage.py,sha256=o6fkV-yUtBihh
|
|
|
109
112
|
agentscope_runtime/sandbox/manager/storage/oss_storage.py,sha256=fIUxgOkOaH_1vlgWBnCM-e4UvD3xS_ycFe2yvSyXzBE,2970
|
|
110
113
|
agentscope_runtime/sandbox/model/__init__.py,sha256=H7cAvnLdcZdMd0XYN04vbvdcrBqbygdVP3X13rWVJug,261
|
|
111
114
|
agentscope_runtime/sandbox/model/api.py,sha256=Sjxw6DHkGa8Sp5dUU5kaajkHPj7eiX1EgFZk-zOPafM,400
|
|
112
|
-
agentscope_runtime/sandbox/model/container.py,sha256=
|
|
113
|
-
agentscope_runtime/sandbox/model/manager_config.py,sha256=
|
|
115
|
+
agentscope_runtime/sandbox/model/container.py,sha256=w2X970bk0C7lLdpq0bk2BJzanVsEES6Btk1LdXWIp4I,1698
|
|
116
|
+
agentscope_runtime/sandbox/model/manager_config.py,sha256=utNDp1ALk0Z_p4Jelm5-mNpj6cn1wANncMpBgvvsqdw,5387
|
|
114
117
|
agentscope_runtime/sandbox/tools/__init__.py,sha256=ioRqvKFLma8Vq0ePwOR5MekijpcHs2USNYA4Dnr-e6M,287
|
|
115
118
|
agentscope_runtime/sandbox/tools/function_tool.py,sha256=mH4dq3M26pdk-XqxIm1wtsvQz5i8SXcP4Gz0-7_L7cQ,10309
|
|
116
119
|
agentscope_runtime/sandbox/tools/mcp_tool.py,sha256=yaEwWLeuLVxlZhhCXVHMxZPCod1bwGHo8W_rNkgKOpI,6063
|
|
117
120
|
agentscope_runtime/sandbox/tools/sandbox_tool.py,sha256=wHkgixb0dy6DexXbfXVOKUFfLL9QOI2H5oiQ2NntoWM,3067
|
|
118
|
-
agentscope_runtime/sandbox/tools/tool.py,sha256=
|
|
121
|
+
agentscope_runtime/sandbox/tools/tool.py,sha256=f2-14tP1V2Vgw5krr0q-uEM3lOAQUF6GdttqYdZkIdI,7361
|
|
119
122
|
agentscope_runtime/sandbox/tools/utils.py,sha256=QksPQK-2DszaQsRw4Srug5hEwrf6hothf-Xp8a1056c,2098
|
|
120
123
|
agentscope_runtime/sandbox/tools/base/__init__.py,sha256=Aboc1tFjgWriw4gqDrX5axpC_Bx469mcn8l8nbNdSXg,143
|
|
121
124
|
agentscope_runtime/sandbox/tools/base/tool.py,sha256=5rCZ_SdDiRCZyQfdsWC1FPq7jwnSSbnKxyjQQK3PAS8,1347
|
|
@@ -123,9 +126,9 @@ agentscope_runtime/sandbox/tools/browser/__init__.py,sha256=gXQx3tXclYqAhPDrXb1-
|
|
|
123
126
|
agentscope_runtime/sandbox/tools/browser/tool.py,sha256=EJ-uhHX9oIb4Q-hXQhTS-7VRJ-AdCRWXb9HVdOQ5JAc,19206
|
|
124
127
|
agentscope_runtime/sandbox/tools/filesystem/__init__.py,sha256=AJK88YU0ceJe99H7T-on2tgaow4ujqGJ1jwv0sd1TtE,607
|
|
125
128
|
agentscope_runtime/sandbox/tools/filesystem/tool.py,sha256=CPsl4TMf76BOSQtG1dqDcVdymciKhMknIG5FffoI2Eg,9847
|
|
126
|
-
agentscope_runtime-0.1.
|
|
127
|
-
agentscope_runtime-0.1.
|
|
128
|
-
agentscope_runtime-0.1.
|
|
129
|
-
agentscope_runtime-0.1.
|
|
130
|
-
agentscope_runtime-0.1.
|
|
131
|
-
agentscope_runtime-0.1.
|
|
129
|
+
agentscope_runtime-0.1.1.dist-info/licenses/LICENSE,sha256=3MckDTgiTJ0E6cxo8FeamFVEFiwz3XJWsriuTtRJzxY,11337
|
|
130
|
+
agentscope_runtime-0.1.1.dist-info/METADATA,sha256=LA8SxGDgMW76fCCr-jisai6PiAgF5DI0XTC1QTEOprY,14732
|
|
131
|
+
agentscope_runtime-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
132
|
+
agentscope_runtime-0.1.1.dist-info/entry_points.txt,sha256=SGQZqgozJYj1yJtiyzqiJ2_iYmDvTl2lexxmXENY3wE,223
|
|
133
|
+
agentscope_runtime-0.1.1.dist-info/top_level.txt,sha256=0YHketA7WcMmRmF-3lUzedeTOnP7iL77h-ekb-iG720,19
|
|
134
|
+
agentscope_runtime-0.1.1.dist-info/RECORD,,
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
import socket
|
|
3
|
-
import subprocess
|
|
4
|
-
import logging
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
logging.basicConfig(level=logging.INFO)
|
|
8
|
-
logger = logging.getLogger(__name__)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def is_port_available(port):
|
|
12
|
-
"""
|
|
13
|
-
Check if a given port is available (not in use) on the local system.
|
|
14
|
-
|
|
15
|
-
Args:
|
|
16
|
-
port (int): The port number to check.
|
|
17
|
-
|
|
18
|
-
Returns:
|
|
19
|
-
bool: True if the port is available, False if it is in use.
|
|
20
|
-
"""
|
|
21
|
-
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
|
22
|
-
try:
|
|
23
|
-
s.bind(("", port))
|
|
24
|
-
# Port is available
|
|
25
|
-
return True
|
|
26
|
-
except OSError:
|
|
27
|
-
# Port is in use
|
|
28
|
-
return False
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def sweep_port(port):
|
|
32
|
-
"""
|
|
33
|
-
Sweep all processes found listening on a given port.
|
|
34
|
-
|
|
35
|
-
Args:
|
|
36
|
-
port (int): The port number.
|
|
37
|
-
|
|
38
|
-
Returns:
|
|
39
|
-
int: Number of processes swept (terminated).
|
|
40
|
-
"""
|
|
41
|
-
try:
|
|
42
|
-
# Use lsof to find the processes using the port
|
|
43
|
-
result = subprocess.run(
|
|
44
|
-
["lsof", "-i", f":{port}"],
|
|
45
|
-
capture_output=True,
|
|
46
|
-
text=True,
|
|
47
|
-
check=True,
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
# Parse the output
|
|
51
|
-
lines = result.stdout.strip().split("\n")
|
|
52
|
-
if len(lines) <= 1:
|
|
53
|
-
# No process is using the port
|
|
54
|
-
return 0
|
|
55
|
-
|
|
56
|
-
# Iterate over each line (excluding the header) and kill each process
|
|
57
|
-
killed_count = 0
|
|
58
|
-
for line in lines[1:]:
|
|
59
|
-
parts = line.split()
|
|
60
|
-
if len(parts) > 1:
|
|
61
|
-
pid = parts[1]
|
|
62
|
-
|
|
63
|
-
# Kill the process using the PID
|
|
64
|
-
subprocess.run(["kill", "-9", pid], check=False)
|
|
65
|
-
killed_count += 1
|
|
66
|
-
|
|
67
|
-
if not is_port_available(port):
|
|
68
|
-
logger.warning(
|
|
69
|
-
f"Port {port} is still in use after killing processes.",
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
return True
|
|
73
|
-
|
|
74
|
-
except Exception as e:
|
|
75
|
-
logger.error(
|
|
76
|
-
f"An error occurred while killing processes on port {port}: {e}",
|
|
77
|
-
)
|
|
78
|
-
return False
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|