fix(mcp): emit portable Unicode NUL patterns (#1230)

Preserve NUL rejection while avoiding the short escape rejected by strict
schema consumers. Guard the entire advertised input/output catalog and all
three JavaScript regexp modes.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
This commit is contained in:
Ysopwnable
2026-10-09 17:18:17 +08:00
committed by GitHub
parent f4c99ab8a5
commit aa5750c263
7 changed files with 33 additions and 20 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ export const swiftSymbolsSchema = z
.string()
.min(1)
.regex(/^[^\n]*$/u, "Each Swift symbol must be one line.")
.regex(/^[^\0]*$/u, "Swift symbols cannot contain NUL."),
.regex(/^[^\u0000]*$/u, "Swift symbols cannot contain NUL."),
)
.min(1);