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
+7
View File
@@ -1,4 +1,11 @@
import { isAbsolute, relative, sep } from "node:path";
import { z } from "zod";
/** Preserve selected filesystem names while rejecting OS-invalid NUL bytes. */
export const localPathStringSchema = z
.string()
.min(1)
.regex(/^[^\0]*$/u, "Local filesystem paths cannot contain NUL");
/** True when the value is an absolute filesystem path on the host platform. */
export const isAbsoluteLocalPath = (value: string): boolean =>