Jarvis-Brain 0.1.4.2__tar.gz → 0.1.4.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Jarvis_Brain
3
- Version: 0.1.4.2
3
+ Version: 0.1.4.4
4
4
  Summary: Jarvis brain mcp
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: beautifulsoup4
@@ -19,7 +19,6 @@ if "TeamNode-Dp" in enabled_modules:
19
19
 
20
20
  if "JarvisNode" in enabled_modules:
21
21
  register_assert_waf(mcp, browser_manager)
22
- register_test(mcp, base_cwd)
23
22
 
24
23
 
25
24
  def main():
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "Jarvis_Brain" # 别人下载时用的名字,必须在 PyPI 上唯一
3
- version = "0.1.4.2"
3
+ version = "0.1.4.4"
4
4
  description = "Jarvis brain mcp"
5
5
  dependencies = [
6
6
  "fastmcp",
@@ -1,42 +0,0 @@
1
- import asyncio
2
-
3
- from typing import Callable, List
4
-
5
-
6
- class SimpleTaskManager:
7
- def __init__(self, max_concurrent: int = 10):
8
- self.semaphore = asyncio.Semaphore(max_concurrent)
9
- self.results = []
10
-
11
- async def execute_task(self, task_id: int, coro_func: Callable, *args, **kwargs):
12
- """执行单个任务"""
13
- async with self.semaphore:
14
- try:
15
- result = await coro_func(*args, **kwargs)
16
- self.results.append((task_id, result))
17
- print(f"✅ 任务 {task_id} 完成")
18
- distribution_after_hook(*result)
19
- return result
20
- except Exception as e:
21
- error_msg = f"任务 {task_id} 失败: {e}"
22
- self.results.append((task_id, error_msg))
23
- print(f"❌ {error_msg}")
24
- return None
25
-
26
- async def process_all(self, tasks: List[tuple]):
27
- """
28
- 处理所有任务
29
- tasks: 列表,每个元素是 (coro_func, args, kwargs) 元组
30
- """
31
- print(f"🚀 开始处理 {len(tasks)} 个任务,最大并发数: {self.semaphore._value}")
32
-
33
- # 创建所有任务
34
- task_coroutines = []
35
- for i, (coro_func, args, kwargs) in enumerate(tasks):
36
- task_coroutines.append(self.execute_task(i, coro_func, *args, **kwargs))
37
-
38
- # 并发执行所有任务
39
- await asyncio.gather(*task_coroutines)
40
-
41
- print(f"🎉 所有任务完成!成功: {len([r for r in self.results if '失败' not in str(r[1])])}")
42
- return self.results