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”
2026-08-23 21:26:39 +08:00
committed by GitHub
parent e64f4cac9f
commit c2a225377b
11 changed files with 1784 additions and 320 deletions
+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;