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:
@@ -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
|
||||
...
|
||||
```
|
||||
|
||||
请使用中文回复。
|
||||
|
||||
Reference in New Issue
Block a user