* fix(mcp): reject unknown official tool inputs * fix(mcp): reject unknown native tool inputs * test(mcp): follow native contract module move * fix(mcp): reject unknown remaining tool inputs * fix(mcp): satisfy strict unknown and browser input schemas Remove obsolete approval fields from residual-unknown fixtures, project update inputs explicitly, and stop passing target_id to list-targets parsing. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
24 lines
736 B
TypeScript
24 lines
736 B
TypeScript
import { z } from "zod";
|
|
|
|
import { isAbsoluteLocalPath } from "../domain/localPath.js";
|
|
|
|
/** Optional expectations used to compare the live session with its caller. */
|
|
export const binarySessionInputSchema = z.strictObject({
|
|
expected_package_version: z.string().min(1).optional(),
|
|
expected_catalog_digest: z
|
|
.string()
|
|
.regex(/^[a-f0-9]{64}$/u)
|
|
.optional(),
|
|
expected_server_path: z
|
|
.string()
|
|
.min(1)
|
|
.refine(isAbsoluteLocalPath, {
|
|
message:
|
|
"expected_server_path must be an absolute local filesystem path (for example /opt/rea/dist/main.js)",
|
|
})
|
|
.describe(
|
|
"Absolute local filesystem path expected for the running server; relative paths are rejected.",
|
|
)
|
|
.optional(),
|
|
});
|