下一轮第 3 波的契约骨架:工作流版本加表的结构版本;定时的非工作流目标按种类交给各自的模块(评测题集 app/eval/scheduled、数据源维护 app/data/source_maintenance,先放照实记「还不能发起」的占位)、record_fire 共用;分享链接、数据源变化记录、口径账本按答案出具与对账的路由先登记好权限

This commit is contained in:
ThearchyHelios
2026-10-16 15:51:33 +08:00
parent c1c423da05
commit 91cc150f17
9 changed files with 117 additions and 2 deletions
+3
View File
@@ -26,6 +26,9 @@ router = APIRouter(prefix="/api/ledger", tags=["ledger"])
#: 口径账本里按运行读的那几个(一个答案里每个数的口径标签等,docs/design/next-round/02-口径账本.md):挂在
#: /api/runs/{run_id}/ledger… 下,和证据接口同一道门(main.py 挂 evidence_scope:使用者只读、而且要能读这次运行)
runs_router = APIRouter(prefix="/api/runs", tags=["ledger"])
#: 按口径正式出具、口径对账这类要写的(docs/design/next-round/02-口径账本.md 做法 5、6):使用者也能发起(总方案拍板
#: 账本-L5:对账都可以,正式出具只限有权使用的应用固定着的口径版本),所以 main.py 只挂登录即可,接口里按运行和应用授权再判
answers_router = APIRouter(prefix="/api/ledger/answers", tags=["ledger"])
@router.get("/workflow-versions/{workflow_id}/{version}")
+10
View File
@@ -0,0 +1,10 @@
"""分享链接(docs/design/next-round/04-对外集成与触达.md C2)。
读分享页的接口不用登录,只认请求头里的分享 key(中间件把 /api/shares/ 当公开前缀,第 3 波 W3-d 加);建、撤销分享在
/api/apps/{id}/shares 下,要应用的 manage 权限。第 3 波 W3-d 填。
"""
from __future__ import annotations
from fastapi import APIRouter
router = APIRouter(prefix="/api/shares", tags=["shares"])
+9
View File
@@ -0,0 +1,9 @@
"""数据源的变化记录(docs/design/next-round/03-数据接入与目录维护.md B3):结构变化、取值变化,查看与处理。
挂在 /api/datasources/{id}/changes 下,要在 datasources 的通配 /{source_id} 之前登记(main.py)。第 3 波 W3-a 填。
"""
from __future__ import annotations
from fastapi import APIRouter
router = APIRouter(prefix="/api/datasources", tags=["source-changes"])