feat(mcp)!: harden contracts and evidence references

BREAKING CHANGE: comparison tools now require session-owned Evidence IDs or approved bundle paths, and structured Evidence results use compact references.
This commit is contained in:
morluto
2026-07-16 19:49:58 +08:00
parent ad398a17f5
commit ee1cd40405
47 changed files with 1387 additions and 672 deletions
+3 -4
View File
@@ -3,7 +3,6 @@ import { createHash } from "node:crypto";
import { z } from "zod";
import {
evidenceBundleSchema,
parseEvidenceBundle,
serializeEvidenceBundle,
type EvidenceBundle,
@@ -22,9 +21,9 @@ const classificationSchema = z.enum([
]);
/** Strict bounded input for canonical Evidence bundle comparison. */
export const bundleComparisonInputSchema = z.object({
left: evidenceBundleSchema,
right: evidenceBundleSchema,
export const bundleComparisonInputSchema = z.strictObject({
left_bundle_path: z.string().min(1).max(4_096),
right_bundle_path: z.string().min(1).max(4_096),
record_pairs: z
.array(
z.object({