refactor(mcp): project diff family output schema from its owning module

Merged
TH
2mo ago
+91-31

Summary

Moves the single hand-authored MCP outputSchema entry for diff out of command-output-schemas.ts into a frozen DIFF_COMMAND_OUTPUT_SCHEMAS map exported from src/commands/capture/diff.ts, following the #2819 projection seam already used by wait and the other migrated families on this stack. Registers the family in the PROJECTED_FAMILIES disjointness check and adds command-tools-capture-diff-schemas.test.ts with a reference-equality proof against the module object and an owner-file check.

diff does not carry the post-action observation trait (#1652): it reports a snapshot comparison, not an interaction, so no settle-graft copy applies here.

Closes #2819.

4 files touched. Stacked on refactor/mcp-output-schemas-2819-management-doctor-schema.

Validation

Tested commit: 77c002f109b77b2f8c1bbe4aaf87c5da06a02e77

pnpm check:affected --run: 166 test files / 1373 tests passed, no failures.

No device needed — this is a pure MCP schema move. Proved byte-identical output two ways:

  1. Diffed the moved code block against git show c58fe851e2:src/mcp/command-output-schemas.ts (origin/main tip) — the diff: entry (mode/baselineInitialized/summary/lines/warnings, same objectSchema/numberSchema/enumSchema/stringSchema/stringArraySchema calls, same field order) is byte-for-byte identical.
  2. Diffed src/commands/command-input.ts (the schema-primitive helpers) between origin/main and this head — zero differences, confirming the helpers diff.ts now calls are unchanged.

No unresolved risk: the change is a pure move with no schema-shape delta.