fix(protocol): align trace schemas with v2/v3 classify rules

RecordedTrace validation now follows classify_value — numeric version
selects v3, otherwise v2 — so mixed pages/states and v2 envelopes with
a version field fail Schema checks before Recall import. Keep standalone
trace_step as a v2|v3 union for tools that validate a single step.
This commit is contained in:
“haonan” authored and GitHub committed 2026-08-22 17:01:15 +08:00
1 parent 825abde4cb
commit 8c76658e76
11 files changed
+1784 -320

No files matched your search

+2
View File
@@ -661,6 +661,7 @@ export interface EmulateResult {
// --------------------------------------------------------------------------
export const TRACE_VERSION_V3 = 3;
/** Logical v2 identifier. Not a wire field — v2 envelopes omit `version`. */
export const TRACE_VERSION_V2 = 2;
export const VOM_FORMAT_VERSION = 1;
@@ -853,6 +854,7 @@ export interface TraceV3 {
}
export type RecordedTrace = TraceV2 | TraceV3;
export type RecordedStep = StepV2 | StepV3;
export interface RecordStartParams {
session_id: string;