You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3d903d4
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(mcp): project system family output schemas from their owning module (#3014)
* refactor(mcp): project system family output schemas from their owning module
Moves the 10 hand-authored MCP outputSchema entries for back, home,
orientation, app-switcher, fold, action-button, tv-remote, clipboard,
appstate, and keyboard out of command-output-schemas.ts into a frozen
SYSTEM_COMMAND_OUTPUT_SCHEMAS map exported from src/commands/system/index.ts,
following the #2810 projection seam. Registers the family in
PROJECTED_FAMILIES and moves its shape-assertion tests into a colocated
command-tools-system-schemas.test.ts, including a reference-equality proof
that accounts for the one entry (back) the settle-observation derivation
pass copies rather than passing through untouched.
Part of #2819.
* fix(contracts): keep the fold coordinate-space constant off the CLI closure
FOLD_SCREEN_COORDINATE_SPACE lived in fold-runtime.ts, a module the CLI
closure did not otherwise load. Importing it directly from
src/commands/system/index.ts pulled fold-runtime.ts (and its own
dependents) into cli.ts's eager import graph, tripping the
eager-closure-budgets gate (295 -> 296 modules).
Move the constant's declaration to device-rotation.ts, which the same
file already loads via the @agent-device/contracts/device facade for
DEVICE_ROTATIONS/FOLD_POSES, and re-export it from the device facade so
importers reach it there.
fold-runtime.ts keeps publishing FOLD_SCREEN_COORDINATE_SPACE (an
external, released API on this subpath) as a literal rather than a
re-export, so importing it does not eagerly load device-rotation.ts and
its own eager closure does not grow either; a type-only import of the
new FoldScreenCoordinateSpace alias still makes any drift between the
two a compile error. Its runtime value consumer (platform-apple's fold
pose runtime) now takes the constant from the device facade it already
imports.
* fix(mcp): share one constSchema and prove ownership both ways
constSchema was hand-copied into src/commands/system/index.ts, drifting
from the identical private helper in command-output-schemas.ts. Export
it once from command-input.ts, next to the other schema-primitive
builders, and import it at both sites.
The ownership test for the projected family map only checked that each
of the module's own entries names the module as owner; it did not check
the inverse, so a system-family command the registry attributes to this
module but missing from SYSTEM_COMMAND_OUTPUT_SCHEMAS would still pass.
Compare the two sets directly.
0 commit comments