Files
xc_agent_platform_demo/docs/api-probe-design.md
VC_noSugar 0d0f3b611a Phase1 skeleton: replace demo main.py with src.server contract
- Overlay ModelHub XC Phase1 (health/status, STRATEGY_ID gate, dry-run)
- Dockerfile CMD -> python -m src.server; FROM stays platform TCR base
- Remove demo main.py and requirements.txt (stdlib only)
- Add tests/, scripts/, docs/, Makefile, config/examples (no secrets)
2026-10-16 15:47:10 +08:00

39 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# API 探针设计(只读意图 · 禁止代调写接口)
- 日期:2026-10-16 Asia/Shanghai
- Phase1:**仅设计文档**;本仓不实现真实 HTTP 写客户端
## 管理 API `/agent_platform/strategies*`
| 方法 | 路径 | 本仓态度 |
|------|------|----------|
| POST | `/agent_platform/strategies` | **禁止代调**(注册) |
| POST | `.../{id}/deploy` | **禁止代调** |
| POST | `.../{id}/stop` | **禁止代调** |
| DELETE | `.../{id}` | **禁止代调** |
| GET | `.../{id}` | 未来只读探针可选(Phase3+,需 Victor 授权) |
| GET | `.../{id}/logs` | 未来只读探针可选 |
鉴权(浏览器):`Authorization: Bearer <login token>`(等级 A)。
## 适配任务 API
| 方法 | 路径 | 本仓态度 |
|------|------|----------|
| GET | `/api/adapt/task/page` | 未来只读鉴权探针(对齐 huni-probe,`ALLOW_SUBMIT=0`) |
| POST | `/api/adapt/task/build-config` | 设计可引用;Phase1 不实现 |
| POST | `/api/adapt/task/add` | **禁止代调**;live 仅闸门 + 单测假客户端 |
| GET | `/api/adapt/task/calculate-credit` | 只读索引;勿写死 KPI |
容器内社区鉴权(C):`Xc-Token` + body `strategyId` — **待 Victor 账号核实**后再实现探针。
## Phase1 落地边界
- `src/gate.py`:闸门逻辑 + `attempt_live_submit(..., client=Fake)` 仅供单测
- **无**默认 `urllib`/`requests` 客户端指向 `task/add` 或 `strategies` POST
- Makefile **无** register / submit / deploy / push
## 冲突裁决提醒
适配 W1:队列 ≥95 → 禁 live;智能体不抢验证空位。