This commit is contained in:
orin
2026-07-30 08:45:38 +08:00
commit 25b24ac4cd
1333 changed files with 170092 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# Orchestrator API
建议采用 FastAPI 实现,进程入口最终放在本目录,业务逻辑放在 `src/cognitive_agent/`。
首期 API 边界:
- `POST /v1/requests`:提交一句话请求,只创建任务。
- `GET /v1/requests/{request_id}`:查询意图、配置、校验和执行状态。
- `GET /v1/requests/{request_id}/events`:SSE 推送 `TraceEvent`。
- `POST /v1/requests/{request_id}/confirm`:处理歧义或高风险动作确认。
- `POST /v1/requests/{request_id}/dry-run`:编译并使用虚拟 CAN 执行。
- `POST /v1/requests/{request_id}/execute`:显式请求 HIL/实车执行,仍受平台和权限门禁。
- `GET /v1/requests/{request_id}/artifacts/{name}`:读取允许公开的配置/报告。
API 不返回模型私有思维链;事件接口返回结构化阶段、摘要、证据引用和结果。
座椅阶段一已实现轻量同源演示 API:
- `GET /api/health`
- `GET /api/runtime`
- `POST /api/requests`,body 为 `{"utterance": "...", "provider": "openai|local|auto"}`
- `GET /api/requests/{request_id}`
这是阶段一开发入口;后续持久任务、SSE、确认和真实执行端点仍按上述正式 API 边界演进。