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 fd3173d
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(mcp): project interaction family output schemas from their owning module (#3025)
* refactor(mcp): project interaction family output schemas from their owning module
Moves the 6 hand-authored MCP outputSchema entries for press, click, fill,
longpress, hover, and find out of command-output-schemas.ts into a frozen
INTERACTION_COMMAND_OUTPUT_SCHEMAS map exported from
src/commands/interaction/index.ts, following the #2810 projection seam.
Registers the family in the PROJECTED_FAMILIES disjointness check and adds
a colocated command-tools-interaction-schemas.test.ts proving reference
equality with the module object, including the settle-observation copy for
the five settle-capable entries (find has no such trait).
postActionSurfaceChangeSchema is duplicated locally rather than imported
back from command-output-schemas.ts (which still needs it for the generic
--settle observation), matching the constSchema duplication precedent from
the system family's move; responseCostSchema and the other interaction-only
helpers had no other consumer and moved outright.
Part of #2819.
* refactor(mcp): declare shared schema primitives once
foregroundApp: stringSchema('Foreground app bundle id or name, when the capture carries it.'),
86
+
nodeCount: numberSchema('Node count in the post-action interactive-only capture.'),
87
+
interactiveNodeCount: numberSchema('Subset of nodeCount the platform reports as hittable.'),
88
+
digest: stringSchema('Order-independent digest of the post-action node multiset.'),
89
+
changedFromBefore: booleanSchema(
90
+
'Whether the post-action digest differs from the pre-action capture digest. false is evidence, not failure. With surfaceChange present, no digest comparison is made: it reports that surface transition.',
'Opaque non-@ diagnostic token. Never a snapshot ref: not issued via refsGeneration and cannot be pinned or reused as an @ref target. UTF-8 truncated to 256 bytes.',
116
+
),
117
+
role: stringSchema('UTF-8 truncated to 256 bytes.'),
118
+
label: stringSchema('UTF-8 truncated to 256 bytes.'),
119
+
},
120
+
['diagnosticRef'],
121
+
);
122
+
123
+
// ResolutionDisclosure (packages/contracts/src/interaction.ts) — never ref-issuing;
124
+
// absent on paths where the guarantee is inapplicable (ADR 0012 decision 2).
125
+
// `alternatives` rides default/full levels only; the digest view omits it.
126
+
constresolutionDisclosureSchema: JsonSchema={
127
+
type: 'object',
128
+
description:
129
+
'Pre-action disclosure of how the acting path resolved its target. Absent when resolutionDisclosure is inapplicable for the path.',
130
+
oneOf: [
131
+
objectSchema(
132
+
{
133
+
source: constSchema('runtime'),
134
+
phase: constSchema('pre-action'),
135
+
kind: constSchema('unique'),
136
+
},
137
+
['source','phase','kind'],
138
+
),
139
+
objectSchema(
140
+
{
141
+
source: constSchema('runtime'),
142
+
phase: constSchema('pre-action'),
143
+
kind: constSchema('disambiguated'),
144
+
matchCount: numberSchema('Total matches resolveSelectorChain found before disambiguation.'),
0 commit comments