docs(features): v0.10.1/v0.10.2 数字校准 + 行业模板文档更新
Some checks failed
CI / Rust Check (push) Has been cancelled
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Rust Check (push) Has been cancelled
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- README.md: SKILL 76→75, Tauri 命令 175→171, SaaS API 58→131, Workers 5→7, 数据表 25→34, Admin 11→13 页面 - 00-saas-overview.md: Agent Template 新增 5 个端点文档、种子数据表、端到端数据流图 - roadmap.md: 同步最新数字 - fix(saasStore): toTopRequired → totpRequired 拼写修复
This commit is contained in:
@@ -139,10 +139,45 @@ ZCLAW SaaS 平台为桌面端用户提供云端能力,包括模型中转(Key
|
||||
|
||||
### Agent 模板
|
||||
- `GET /api/v1/agent-templates` — 列出模板 (分页 + 分类/来源/可见性过滤)
|
||||
- `POST /api/v1/agent-templates` — 创建模板
|
||||
- `GET /api/v1/agent-templates/:id` — 获取模板
|
||||
- `POST /api/v1/agent-templates` — 创建模板 (输入验证: name 非空+长度限制, temperature 0.0-1.0, max_tokens 0-65535)
|
||||
- `GET /api/v1/agent-templates/:id` — 获取模板 (含全部 25 列)
|
||||
- `GET /api/v1/agent-templates/available` — 列出公开可用模板 (轻量级, 仅核心字段)
|
||||
- `POST /api/v1/agent-templates/:id` — 更新模板
|
||||
- `DELETE /api/v1/agent-templates/:id` — 归档模板
|
||||
- `POST /api/v1/agent-templates/:id/create-agent` — 从模板创建 Agent 配置 (tools 合并, model fallback)
|
||||
- `POST /api/v1/accounts/me/assign-template` — 分配行业模板到当前账户
|
||||
- `GET /api/v1/accounts/me/assigned-template` — 获取已分配的行业模板
|
||||
- `DELETE /api/v1/accounts/me/assigned-template` — 取消行业模板分配
|
||||
|
||||
#### 行业模板种子数据
|
||||
|
||||
6 个内置行业模板 (source='builtin'):
|
||||
|
||||
| 模板 | 模型 | 工具 | 温度 |
|
||||
|------|------|------|------|
|
||||
| Code Assistant | gpt-4o | file_read, file_write, shell_exec | 0.3 |
|
||||
| Content Writer | claude-sonnet-4-20250514 | web_fetch, file_write | 0.7 |
|
||||
| Data Analyst | gemini-2.5-pro | shell_exec, file_read | 0.2 |
|
||||
| Research Agent | deepseek-chat | web_fetch, file_read | 0.5 |
|
||||
| Translator | gpt-4o | (none) | 0.3 |
|
||||
| Medical Assistant | claude-sonnet-4-20250514 | web_fetch, file_read | 0.2 |
|
||||
|
||||
#### 端到端数据流
|
||||
|
||||
```text
|
||||
用户选择模板 → assignTemplate(templateId)
|
||||
→ 后端: accounts.assigned_template_id = templateId
|
||||
→ 前端 createFromTemplate(template)
|
||||
→ Step 1: saasClient.createAgentFromTemplate(templateId) — 后端合并 tools+capabilities
|
||||
→ Step 2: client.createClone(merged config)
|
||||
→ Step 3: identity.updateFile('soul', soul_content)
|
||||
→ Step 4: identity.updateFile('system', system_prompt)
|
||||
→ Step 5: updateClone(temperature, maxTokens, tools, source_template_id, welcomeMessage, quickCommands)
|
||||
→ Step 6: loadClones() 刷新 store
|
||||
→ ChatArea: FirstConversationPrompt
|
||||
→ clone.welcomeMessage || generateWelcomeMessage()
|
||||
→ clone.quickCommands || 硬编码 QUICK_ACTIONS
|
||||
```
|
||||
|
||||
### 遥测 (Telemetry)
|
||||
- `POST /api/v1/telemetry/report` — 批量上报 Token 用量 (每次最多 500 条)
|
||||
|
||||
Reference in New Issue
Block a user