fix(process): preserve numeric output and original PTY evidence
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { jsonValueSchema, type JsonValue } from "../jsonValue.js";
|
||||
import type { UnverifiedProcessCapture } from "./processCapture.js";
|
||||
import type {
|
||||
TerminalFrame,
|
||||
UnverifiedProcessCapture,
|
||||
} from "./processCapture.js";
|
||||
|
||||
/** Project normalized PTY facts without source text used only for audit. */
|
||||
export const comparableTerminalFrame = (frame: TerminalFrame) => ({
|
||||
sequence: frame.sequence,
|
||||
at_ms: frame.at_ms,
|
||||
data: frame.data,
|
||||
});
|
||||
|
||||
/** Process-capture observation families shared by live drivers and trace assertions. */
|
||||
export const processObservationSourceSchema = z.enum([
|
||||
@@ -126,11 +136,14 @@ const projectedRecord = (
|
||||
): ProjectedRecord | null => {
|
||||
const projected = (() => {
|
||||
switch (location.collection) {
|
||||
case "frames":
|
||||
case "frames": {
|
||||
const frame = capture.frames[location.index];
|
||||
return {
|
||||
source: "terminal_raw" as const,
|
||||
value: capture.frames[location.index],
|
||||
value:
|
||||
frame === undefined ? undefined : comparableTerminalFrame(frame),
|
||||
};
|
||||
}
|
||||
case "rendered_frames":
|
||||
return {
|
||||
source: "terminal_rendered" as const,
|
||||
|
||||
Reference in New Issue
Block a user