fix(contracts): preserve local inputs and comparison uncertainty

This commit is contained in:
morluto
2026-10-09 06:49:02 +08:00
parent 7a7460f04f
commit 70e8a8f860
35 changed files with 460 additions and 386 deletions
+5 -4
View File
@@ -1,6 +1,9 @@
import { z } from "zod";
import { isAbsoluteLocalPath } from "../domain/localPath.js";
import {
isAbsoluteLocalPath,
localPathStringSchema,
} from "../domain/localPath.js";
/** Optional expectations used to compare the live session with its caller. */
export const binarySessionInputSchema = z.strictObject({
@@ -9,9 +12,7 @@ export const binarySessionInputSchema = z.strictObject({
.string()
.regex(/^[a-f0-9]{64}$/u)
.optional(),
expected_server_path: z
.string()
.min(1)
expected_server_path: localPathStringSchema
.refine(isAbsoluteLocalPath, {
message:
"expected_server_path must be an absolute local filesystem path (for example /opt/rea/dist/main.js)",