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
+4 -2
View File
@@ -8,6 +8,7 @@ import {
import type { ToolContract } from "../toolContracts.js";
import { nativeOutputSchemas } from "../toolOutputSchemas.js";
import { jsonValueSchema } from "../../domain/jsonValue.js";
import { localPathStringSchema } from "../../domain/localPath.js";
import { toolContractMetadata } from "../toolEffects.js";
import { requireOutputSchema } from "../toolOutputSchemaPrimitives.js";
@@ -69,7 +70,8 @@ export const swiftSymbolsSchema = z
z
.string()
.min(1)
.regex(/^[^\n]*$/u, "Each Swift symbol must be one line."),
.regex(/^[^\n]*$/u, "Each Swift symbol must be one line.")
.regex(/^[^\0]*$/u, "Swift symbols cannot contain NUL."),
)
.min(1);
@@ -104,7 +106,7 @@ export const NATIVE_TOOL_CONTRACTS = [
"inspect_plist",
"Parse Info.plist from the active artifact by default, or pass any local plist path. Returns normalized JSON rather than plutil text.",
z.object({
path: z.string().min(1).optional(),
path: localPathStringSchema.optional(),
}),
),
native(