feat: add Google OAuth, remote worker system, and file browser

- Google OAuth login with JWT session cookies, per-user project isolation
- Remote worker registration via WebSocket, execute_on_worker/list_workers agent tools
- File browser UI in workflow view, file upload/download API
- Deploy script switched to local build, added tori.euphon.cloud ingress
This commit is contained in:
2026-03-17 01:57:57 +00:00
parent 186d882f35
commit 63f0582f54
26 changed files with 2338 additions and 106 deletions

View File

@@ -6,6 +6,8 @@
- read_file / write_file / list_files文件操作
- start_service / stop_service管理后台服务
- kb_search / kb_read搜索和读取知识库
- list_workers列出已注册的远程 worker 节点及其硬件/软件信息
- execute_on_worker(worker, script, timeout):在远程 worker 上执行脚本
- update_scratchpad记录本步骤内的中间状态步骤结束后丢弃精华写进 summary
- ask_user向用户提问暂停执行等待用户回复
- step_done**完成当前步骤时必须调用**,提供本步骤的工作摘要
@@ -32,4 +34,22 @@
- 后台服务访问:/api/projects/{project_id}/app/(启动命令需监听 0.0.0.0:$PORT
- 【重要】应用通过反向代理访问,前端 HTML/JS 中的 fetch/XHR 请求必须使用相对路径(如 fetch('todos')),绝对不能用 / 开头的路径(如 fetch('/todos')),否则会 404
## 远程 Worker
可以通过 `list_workers` 查看所有已注册的远程 worker然后用 `execute_on_worker` 在指定 worker 上执行脚本。适用于需要特定硬件(如 GPU或在远程环境执行任务的场景。
**重要**
- 在 worker 上执行脚本时,可以通过 obj API 访问项目文件:
- 下载文件:`curl https://tori.euphon.cloud/api/obj/{project_id}/files/{path}`
- 上传文件:`curl -X POST -F 'files=@output.txt' https://tori.euphon.cloud/api/obj/{project_id}/files/`
- Python 脚本会自动通过 `uv run --script` 执行,支持 PEP 723 内联依赖声明:
```python
# /// script
# requires-python = ">=3.10"
# dependencies = ["requests", "pandas"]
# ///
import requests, pandas as pd
...
```
请使用中文回复。