fix(mcp): advertise input patterns without look-around

trace_dylib_resolution roots and capture_process_scenario environment
names still advertised negative look-ahead patterns. RE2 and Rust schema
validators reject look-around, so a client using one refuses the whole
tools request, as #1282 reported for the NUL escape. Spell both
constraints as equivalent look-around-free patterns and assert that no
advertised pattern uses look-around or backreferences.

Closes #1282

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-09 14:49:22 +00:00
co-authored by Claude Opus 5.5
parent 99f257bbf0
commit a8701eaf48
4 changed files with 113 additions and 3 deletions
@@ -77,6 +77,12 @@ it("advertises portable NUL escapes and patterns that compile in all JS modes",
);
expect(uncompilable).toEqual([]);
// RE2 and Rust validators reject look-around and backreferences, and like
// the NUL escape below, one such pattern refuses the complete tools request.
expect(
patterns.filter(({ pattern }) => /\(\?<?[=!]|\\[1-9]|\\k</u.test(pattern)),
).toEqual([]);
// DeepSeek rejects the short NUL escape even though V8 accepts it in all
// three modes. Schema compilation must not hide that interchange failure.
expect(patterns.filter(({ pattern }) => pattern.includes("\\0"))).toEqual([]);