* fix(backend): initialize async queue properly and fix auth login error handling (#18) - Moved `self.workflow_queue = asyncio.Queue()` to the top of `WorkflowRunningEngine.run` to ensure the queue exists before coroutines start polling it, resolving initialization race conditions. - Handled `user` object nullability check correctly in `/api/v1/auth/login` to raise `UserNotExistError` instead of crashing on attribute access. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> * feat: Integrate frontend dashboard and wire up settings endpoints - Imported and moved the pretor_dashboard dev branch into `frontend/`. - Configured FastAPI `PretorGateway` to mount `frontend/dist` out of the box and serve it effectively. - Fixed `global_state_machine` Ray Actor hook references in `pretor/api/resource.py`. - Added missing GET `/api/v1/auth/list` endpoint to list all users. - Added missing DELETE `/api/v1/auth/{user_id}` endpoint to remove users. - Plumbed API calls in the frontend's `UsersSettings.tsx` to get, delete, and alter the authority roles. - Wired up provider deletion API endpoints within `ProvidersSettings.tsx`. - Ran `npm run build` so `frontend/dist` is current. Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> * feat: Integrate frontend dashboard and wire up settings endpoints - Imported and moved the pretor_dashboard dev branch into `frontend/`. - Configured FastAPI `PretorGateway` to mount `frontend/dist` out of the box and serve it effectively. - Fixed `global_state_machine` Ray Actor hook references in `pretor/api/resource.py`. - Added missing GET `/api/v1/auth/list` endpoint to list all users. - Added missing DELETE `/api/v1/auth/{user_id}` endpoint to remove users. - Plumbed API calls in the frontend's `UsersSettings.tsx` to get, delete, and alter the authority roles. - Wired up provider deletion API endpoints within `ProvidersSettings.tsx`. - Ran `npm run build` so `frontend/dist` is current. Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> * fix(backend): Remove __call__ from PretorGateway and assign first user as SUPER_ADMINISTRATOR - Removed `__call__` from `PretorGateway` in `pretor/core/api/__init__.py` to fix Ray Serve `ValueError` during initialization. - Modified `AuthDatabase.add_user` in `pretor/core/database/module/user.py` to check for existing users. The first registered user now receives `UserAuthority.SUPER_ADMINISTRATOR` access while subsequent users get `USER` access. Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> * fix(backend): Remove __call__ from PretorGateway and assign first user as SUPER_ADMINISTRATOR - Removed `__call__` from `PretorGateway` in `pretor/core/api/__init__.py` to fix Ray Serve `ValueError` during initialization. - Added connection error handling in `PostgresDatabase.init_db()` to prevent startup crashes when PostgreSQL is unavailable. - Updated `AuthDatabase.add_user` to automatically grant `SUPER_ADMINISTRATOR` privileges to the first registered user. - Fixed unit tests in `user_test.py` that were improperly mocking `session.execute`, removing confusing stack traces during testing. Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> * fix(backend): Remove __call__ from PretorGateway and assign first user as SUPER_ADMINISTRATOR - Removed `__call__` from `PretorGateway` in `pretor/core/api/__init__.py` to fix Ray Serve `ValueError` during initialization. - Added connection error handling in `PostgresDatabase.init_db()` to prevent startup crashes when PostgreSQL is unavailable. - Updated `AuthDatabase.add_user` to automatically grant `SUPER_ADMINISTRATOR` privileges to the first registered user. - Fixed unit tests in `user_test.py` that were improperly mocking `session.execute`, removing confusing stack traces during testing. Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> |
||
|---|---|---|
| config | ||
| docs | ||
| frontend | ||
| pretor | ||
| tests | ||
| .dockerignore | ||
| .env | ||
| .gitignore | ||
| .python-version | ||
| Dockerfile | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| docker-compose.yml | ||
| main.py | ||
| pyproject.toml | ||
| uv.lock | ||
README.md
Pretor 是一款基于 Ray 构建的下一代分布式多 Agent 协作系统。项目采用“中心监管 + 边缘执行”的异构集群模式,通过大参数 MoE 模型进行高层逻辑推理,并协同微调后的轻量化模型高效完成具体任务。借助 Pydantic-AI 提供的强类型约束与 FastAPI 异步网关,Pretor 实现了任务从需求拆解、资源调度到自动化执行的全链路闭环,为个人提供可靠的人工智能助手服务。
特别之处?
- 本项目通过 Ray 和 vllm 实现个人个性化助手的创建,你可以通过收集符合你自己偏好的数据,构建独属于自己的风格的人工智能助手。
- 本项目通过多 Agent 协作,实现比起单 Agent 系统更强的性能,从而完成更复杂的任务。
- 本项目通过调用本地模型,从而减少对于昂贵的API使用和一定程度上的安全保护。如果你是创作者,可以通过用自己的作品去训练属于自己的模型,提高工作效率。
- (暂未实现)本项目适配多种消息平台,实现在外可通过多种方式给 Pretor 下达指令完成工作。
- (暂未实现)本项目内置 growth_node(生长节点) ,实现傻瓜式微调模型操作,让你的 Pretor 自己学会一些独特的技能。
快速开始
本项目正在开发中...
项目子项目
pretor-viceroy:
项目名称 : 总督
github网址 :https://github.com/zhaoxi826/viceroy
功能 :pretor的资源管理工具
目前实现 :
- 对于skill的安装与解析
pretor-domain
项目名称 : 域
github网址 :(暂无)
功能 : 轻量化沙箱
目前实现 :
(规划中)
pretor-explorer
项目名称 : 探索者
github网址 :(暂无)
功能 : 自动爬虫
目前实现 :
(规划中)
pretor-pioneer
项目名称 : 先驱者
github网址 :(暂无)
功能 : RAG检索增强生成
目前实现 :
(规划中)