Commit Graph

11 Commits

Author SHA1 Message Date
朝夕 3241e798ac
feat: fix individual page configuration to properly display system nodes (#41)
- Added `SystemNodeConfig` database table to persist system node config (provider and model).
- Updated `AgentLayout` and `WorkerIndividualSettings` to restrict config modifications to only provider and model for system nodes.
- Hid delete button for system nodes and removed them from the creation modal dropdown.
- Updated Agent API to support querying configured system nodes and persisting setups.

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>
2026-04-27 15:18:01 +08:00
朝夕 dc1c440703 fix: 修复了严重bug 2026-04-26 23:36:07 +08:00
朝夕 27a71c9e49
Feature/frontend dashboard integration 11563952984595832647 (#20)
* 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>
2026-04-24 11:46:47 +08:00
朝夕 66306ffd01
[feature integration] frontend dashboard and API endpoints (#19)
* 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>

---------

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>
2026-04-24 09:12:12 +08:00
朝夕 6055606e2c wip: 完善了worker_individual和workflow_running_engine的逻辑 2026-04-22 21:16:43 +08:00
朝夕 81da2e9f81 wip: 对于用户模型进行了优化,增加了权限模型和权限校验 2026-04-21 23:00:59 +08:00
朝夕 446e208193 wip: 初步增加了worker_individual,修改了trace_id 2026-04-21 15:06:50 +08:00
朝夕 3cf2411c4a wip: 修改了大量漏洞 2026-04-17 22:07:49 +08:00
朝夕 3a8b1e4054 wip: 优化bug 2026-04-17 19:43:32 +08:00
朝夕 2e5b2bce3a wip:更新版权 2026-04-10 10:50:25 +08:00
朝夕 2552017ea7 wip:对于api接口进行了完善,完善了global_state_machine(全局状态机),进行了大规模重构 2026-04-08 22:09:54 +08:00