Repository navigation
Conversation
…s (law 7) adapters/typescript/src/fence.ts ports mcp_bridge.quarantined, is_quarantined and fenced_regions byte for byte, so a TypeScript runtime puts an MCP server's prose or an A2A reply in front of a model in the reference's words. test_both_ports_fence_one_way.py holds the port to the reference over every line boundary str.splitlines reads, a forged fence and heading, empty and non-ASCII text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Law 7 ("origins travel; only reviewed text instructs") has one fence in the reference:
mcp_bridge.quarantined, the only shape an MCP server's prose or an A2A agent's reply may reach a model in. A runtime written in TypeScript needs the same fence in the same words, so a transcript reads the same whichever runtime ran it.What changes
adapters/typescript/src/fence.ts:quarantined,isQuarantinedandfencedRegions, ported frommcp_bridge.pybyte for byte in what they return, with the constantsNOT_AUTHORITATIVE,FENCEandQUOTED, andsplitLines, which splits as Python'sstr.splitlinesdoes.adapters/typescript/read-fence.mtsandadapters/python/tests/test_both_ports_fence_one_way.py: the reference and the port fence the same 21 cases (every line boundarysplitlinesreads, a forged fence and heading, an empty text, trailing blank lines, non-ASCII text; each as server prose, under a pinned digest, and as an A2A reply), read the same probes, and refuse unfenced text in the same words. 3 passed (uv run --extra test pytest tests/test_both_ports_fence_one_way.py).Why
Bud Meta Harness runs PACT agents and fences every untrusted channel it delivers (tool output, MCP prose, retrieved passages, recalled memory, teammates' answers, inbound messages) with this port; it carries the file as a logged local modification until this merges.
🤖 Generated with Claude Code