From 0bb051e1dd4a99c03cfc93b55f751e82209bb754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=A1=82=E9=9B=84?= Date: Mon, 16 Nov 2026 08:41:49 +0800 Subject: [PATCH] fix(mcp): trim the press plan text back under the always-loaded byte budget #4296 grew the press tool description and the intervalMs field copy by ~400 bytes, which pushed the always-loaded tool set over the 22 KiB first-prompt budget the loading-meta test guards (22862 bytes > 22528 on CI). The long plan contract already lives in docs/commands.md and the ADR; the MCP description keeps the semantic minimum (comma-separated ref list, 2-16 keys, one command, admitted before the first press) and intervalMs returns to its pre-plan wording. --- packages/command-surface/src/command-input.ts | 5 +---- packages/command-surface/src/interaction/metadata.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/command-surface/src/command-input.ts b/packages/command-surface/src/command-input.ts index f18c2a27b6..b2e96478ea 100644 --- a/packages/command-surface/src/command-input.ts +++ b/packages/command-surface/src/command-input.ts @@ -392,10 +392,7 @@ export function selectorSnapshotFields() { export function repeatedFields() { return { count: integerField('Number of press/click repetitions.', { min: 1 }), - intervalMs: integerField( - 'Delay between repeated press/click actions, or between the keys of a comma-separated ref sequence.', - { min: 0 }, - ), + intervalMs: integerField('Delay between repeated press/click actions.', { min: 0 }), holdMs: integerField('Hold duration for each action.', { min: 0 }), jitterPx: integerField( 'Deterministic per-axis coordinate jitter in pixels (each press offsets x and y by up to this amount).', diff --git a/packages/command-surface/src/interaction/metadata.ts b/packages/command-surface/src/interaction/metadata.ts index 74b5869629..f6c4471845 100644 --- a/packages/command-surface/src/interaction/metadata.ts +++ b/packages/command-surface/src/interaction/metadata.ts @@ -67,7 +67,7 @@ const interactionCommandDescriptions = { click: "Activate a UI target by snapshot ref, selector, or coordinates. This can change app state. Success reports dispatch only; settle returns the resulting UI diff and verify returns cheap post-action evidence. A ref or selector target is re-checked for motion before dispatch when the session's previous action just animated the screen, and is dispatched at its resting position; one that has not stopped refuses with target_still_moving rather than acting where it was. With settle, continue from the returned diff. Copy refs exactly, including any ~sN suffix.", press: - "Short-press a UI target by snapshot ref, selector, or coordinates. Success reports dispatch only; settle returns the resulting UI diff and verify returns cheap post-action evidence. A ref or selector target is re-checked for motion before dispatch when the session's previous action just animated the screen, and is dispatched at its resting position; one that has not stopped refuses with target_still_moving rather than acting where it was. A comma-separated ref list (`@e13,@e14,@e15,@e16`) dispatches its keys in order as one command; 2-16 refs, a repeated ref repeats that key, and the response carries a sequence summary of refs and points. The plan admits every key before the first press; later keys dispatch where the snapshot showed them, and a later refusal carries details.dispatchedSteps, details.refPlanKey, and details.refPlanPending.", + "Short-press a UI target by snapshot ref, selector, or coordinates. Success reports dispatch only; settle returns the resulting UI diff and verify returns cheap post-action evidence. A ref or selector target is re-checked for motion before dispatch when the session's previous action just animated the screen, and is dispatched at its resting position; one that has not stopped refuses with target_still_moving rather than acting where it was. A comma-separated ref list dispatches 2-16 keys in order as one command, admitted before the first press.", fill: 'Replace text in a UI input selected by snapshot ref, selector, or coordinates. An empty text clears the field. Unconfirmed evidence does not establish the resulting value or screen. The recordAs option keeps sensitive text out of a recorded replay while sending it to the live app. To append instead of replacing, use type.', longpress: 'Hold a UI target by snapshot ref, selector, or coordinates to open a context menu or perform another hold gesture. The durationMs input overrides the default hold duration.',