refactor(mcp): project device management family output schemas from their owning module

Merged
TH
2mo ago
+97-41

Summary

Moves the 2 hand-authored MCP outputSchema entries for boot and shutdown out of src/mcp/command-output-schemas.ts into a frozen DEVICE_MANAGEMENT_COMMAND_OUTPUT_SCHEMAS map exported from src/commands/management/device.ts, following the same #2810 projection seam already used on this stack for the interaction and system families. Registers management-device in the PROJECTED_FAMILIES disjointness check and adds a colocated reference-equality test. Neither boot nor shutdown carries the post-action observation trait (both are device-runtime commands, not interaction commands), so no settle-graft copy applies. DEVICE_KINDS is duplicated locally in the owning module rather than imported back from command-output-schemas.ts (which still needs its own copy for prepare), matching the constSchema/responseCostSchema duplication precedent from the earlier moves in this stack.

Part of #2819. Touched files: 4 (2 modified source files, 1 modified shared test, 1 new colocated test). Stacked on refactor/mcp-output-schemas-2819-interaction-index-schemas.

Validation

Tested at commit 5f47c181ac.

pnpm check:affected --run: all 159 affected test files passed (1346 tests), including the new command-tools-management-device-schemas.test.ts and the updated command-tools-replay-schemas.test.ts disjointness/composition check.

No device-facing behavior changed — this is a pure schema-ownership move with no shape edits, so no live simulator/emulator run was needed. Confirmed via commandSupportsSettleObservation that boot/shutdown carry no post-action observation trait, and via packages/command-registry/src/registry.ts that both descriptors already declare ownerFiles: ['src/commands/management/device.ts'], so no owner-file gap exists. The pre-existing command-tools.test.ts shape/behavior assertions for boot/shutdown (public-leaf platform enum, full-result validation, missing-field rejection) all still pass unchanged against the projected schemas, which is the byte-identical-outputSchema proof for this move.