test(db,contracts): register the 0037 tables and agent_run.await_wake in schema checks

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 20:22:45 +08:00
1 parent dd0167fe85
commit efb5d206c1
2 files changed
+14 -3

No files matched your search

+7 -3
View File
@@ -39,8 +39,8 @@ type Obj = z.ZodObject;
const ROWS: Record<string, { row: Obj; dbOnly?: string[]; apiOnly?: string[] }> = {
AcquisitionPlan: { row: C.AcquisitionPlan },
AcquisitionSlot: { row: C.AcquisitionSlot, apiOnly: ["currentAsset"] },
// upstream_id 只在服务端使用(runAgent 选上游),不在 AgentRun 视图里
AgentRun: { row: C.AgentRun, dbOnly: ["upstreamId"] },
// upstream_id 只在服务端使用;await_wake 是挂起等待子会话时的唤醒信号(C1-B),都不进 AgentRun 视图
AgentRun: { row: C.AgentRun, dbOnly: ["upstreamId", "awaitWake"] },
AgentRunEvent: { row: C.AgentRunEventRow },
AgentRunMessage: { row: C.AgentRunMessage },
CapabilityInvocation: { row: C.CapabilityInvocation },
@@ -132,8 +132,12 @@ const INTERNAL_TABLES = [
// W9-I 进程心跳(0034):服务端内部,经 /system/health 的专用 DTO 暴露
"ProcessHeartbeat",
"ProcessHeartbeatSample",
// C1-B 恢复码 / Passkey / WebAuthn 挑战(0037):服务端内部,经 contracts/auth.ts 的专用 DTO 暴露
"AdminRecoveryCode",
"AdminPasskey",
"WebauthnChallenge",
];
const INTERNAL_ENUMS = ["TasksOpLedgerStatus"];
const INTERNAL_ENUMS = ["TasksOpLedgerStatus", "WebauthnChallengePurpose"];
/** DB 枚举类型名 → contracts 枚举 */
const ENUMS: Record<string, z.ZodEnum> = {