Problem
The MCP output schemas for boot and shutdown use the internal PLATFORMS
enum (apple | android | linux | web), while the public command contracts and
runtime emit PublicPlatform (ios | macos | android | linux | web).
prepare has the same schema mismatch, although it is not MCP-exposed.
The current boot schema test checks required keys only, so an ios fixture
passes without validating enum membership.
Scope
- Use the public platform vocabulary in public command output schemas.
- Validate representative structured content against the complete advertised
schema, including enums/consts and nested required fields.
- Cover both Apple public leaves and preserve additive fields (
cost, future
fields); do not introduce additionalProperties: false.
- Keep internal platform identity as
apple; do not change runtime wire values.
Owning files
src/mcp/command-output-schemas.ts
src/mcp/__tests__/command-tools.test.ts
src/contracts/device.ts
src/contracts/prepare.ts
src/kernel/device.ts
Acceptance criteria
- Valid
ios and macos boot/shutdown results satisfy their advertised MCP
schemas.
- Internal
apple is not advertised on these public result fields.
- Invalid enum values fail the schema validation test.
prepare mirrors its PublicPlatform contract.
pnpm check:affected --base origin/main --run passes.
Non-goals
- Public
ios/macos to apple migration.
- Repository-wide JSON Schema generation or strict schemas.
Problem
The MCP output schemas for
bootandshutdownuse the internalPLATFORMSenum (
apple | android | linux | web), while the public command contracts andruntime emit
PublicPlatform(ios | macos | android | linux | web).preparehas the same schema mismatch, although it is not MCP-exposed.The current boot schema test checks required keys only, so an
iosfixturepasses without validating enum membership.
Scope
schema, including enums/consts and nested required fields.
cost, futurefields); do not introduce
additionalProperties: false.apple; do not change runtime wire values.Owning files
src/mcp/command-output-schemas.tssrc/mcp/__tests__/command-tools.test.tssrc/contracts/device.tssrc/contracts/prepare.tssrc/kernel/device.tsAcceptance criteria
iosandmacosboot/shutdown results satisfy their advertised MCPschemas.
appleis not advertised on these public result fields.preparemirrors itsPublicPlatformcontract.pnpm check:affected --base origin/main --runpasses.Non-goals
ios/macostoapplemigration.