feat!: make evidence bundles canonical MCP resources
Add immutable session bundle snapshots, bounded resource discovery, paginated unknowns, mutable current analysis snapshots, and provider-neutral navigation/address context tools. BREAKING CHANGE: export_evidence_bundle now requires a filesystem path and no longer returns an inline bundle.
This commit is contained in:
@@ -89,6 +89,14 @@ const successResult = (
|
||||
options.evidenceTextProjection),
|
||||
),
|
||||
},
|
||||
...(hasResourceLinks(value, contract, options)
|
||||
? [
|
||||
{
|
||||
type: "text" as const,
|
||||
text: "Full detail is available through MCP resources/read. Copy the opaque URI exactly. In Codex, call read_mcp_resource.",
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...evidenceResourceLinks(
|
||||
value,
|
||||
contract.kind === "session" ||
|
||||
@@ -104,6 +112,19 @@ const successResult = (
|
||||
};
|
||||
};
|
||||
|
||||
const hasResourceLinks = (
|
||||
value: JsonValue,
|
||||
contract: ToolContract,
|
||||
options: ToolResultOptions,
|
||||
): boolean =>
|
||||
options.resourceLinks !== undefined && options.resourceLinks.length > 0
|
||||
? true
|
||||
: evidenceResourceLinks(
|
||||
value,
|
||||
contract.kind === "session" ||
|
||||
options.evidenceResourcesAvailable === true,
|
||||
).length > 0;
|
||||
|
||||
const compactEvidence = (
|
||||
value: JsonValue,
|
||||
resultProjection: JsonValue | undefined,
|
||||
|
||||
Reference in New Issue
Block a user