From 52ff3123cbe07afbbadb3c5d24955cbba2d1835d Mon Sep 17 00:00:00 2001 From: RRFZ <247457381+Plastic-time@users.noreply.github.com> Date: Wed, 4 Nov 2026 06:04:57 -0500 Subject: [PATCH] docs(mcp): list every tool that omits the untrusted-content marker (#8837) --- docs/mcp-contracts.md | 10 ++++++---- .../contracts/targetContentProvenance.test.ts | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/mcp-contracts.md b/docs/mcp-contracts.md index 6ac4ac4411..2bc4680ed6 100644 --- a/docs/mcp-contracts.md +++ b/docs/mcp-contracts.md @@ -500,10 +500,12 @@ result's `_meta`, whether the call succeeded or failed: ``` The marker is declared once per tool contract (`returnsTargetContent`) and is -on by default: `export_evidence_bundle`, `record_unknown`, `search_guidance`, -and `read_guidance_section` omit it. The first two contain only REA session -state or caller-supplied values; the guidance tools return REA's own installed -documentation, not text from an analysis target. Tools whose results or errors +on by default: `inspect_analysis_settings`, `update_analysis_settings`, +`export_evidence_bundle`, `record_unknown`, `guided_workflows`, +`search_guidance`, and `read_guidance_section` omit it. The first four contain +only REA session state or caller-supplied values; the workflow and guidance +tools return REA's own installed workflows and documentation, not text from an +analysis target. Tools whose results or errors can include provider, launcher, or device output stay marked, including `binary_session` (provider failure reasons and availability diagnostics), `close_binary` (provider cleanup diff --git a/tests/conformance/contracts/targetContentProvenance.test.ts b/tests/conformance/contracts/targetContentProvenance.test.ts index 3041892013..58ec19d16d 100644 --- a/tests/conformance/contracts/targetContentProvenance.test.ts +++ b/tests/conformance/contracts/targetContentProvenance.test.ts @@ -1,3 +1,6 @@ +import { readFile } from "node:fs/promises"; +import { resolve } from "node:path"; + import { describe, expect, it } from "vitest"; import { TOOL_CONTRACTS } from "../../../src/contracts/toolContracts.js"; @@ -28,6 +31,17 @@ describe("target-content provenance audit", () => { ]); }); + it("documents exactly the audited content-free exceptions", async () => { + const guide = await readFile(resolve("docs/mcp-contracts.md"), "utf8"); + const exceptions = /on by default: ([^.]*?) omit it\./su.exec(guide)?.[1]; + expect(exceptions).toBeDefined(); + expect( + [...(exceptions ?? "").matchAll(/`([a-z_]+)`/gu)] + .map(([, name]) => name) + .sort(), + ).toEqual([...TARGET_CONTENT_FREE_TOOLS].sort()); + }); + it.each([ "procedure_pseudo_code", "list_strings",