@runsnative/mcp-server 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,9 +4,12 @@ export const GET_MARKER_CAPTURE_TOOL = {
|
|
|
4
4
|
name: 'get_marker_capture',
|
|
5
5
|
description: 'Fetch pending marker captures from the linked runsnative.org tab — regions the user circled ' +
|
|
6
6
|
'with the marker overlay. Use when the user says they marked, circled, or pointed at something ' +
|
|
7
|
-
'on the site, or asks "can you see what I selected?". Each capture carries the
|
|
8
|
-
'
|
|
9
|
-
'
|
|
7
|
+
'on the site, or asks "can you see what I selected?". Each capture carries the authorable ' +
|
|
8
|
+
'components inside the circled region: a `container` (where it sits) and a ranked list of ' +
|
|
9
|
+
'`targets` — each with a `role`, a content `preview`, and an `instanceId` (usable with ' +
|
|
10
|
+
'set_instance_variant) — so a request like "change the text here and the icon" maps directly ' +
|
|
11
|
+
'onto them. `total_in_region`/`truncated` flag when a region held more than the shown targets ' +
|
|
12
|
+
'(ask the user to circle tighter). Structural head only (JUNE-623 push→pull inversion). Pixels are NOT ' +
|
|
10
13
|
'inlined: when `has_crop` is true and the complaint is visual (not structural), call ' +
|
|
11
14
|
'fetch_marker_crop with the capture_id to see the region. Single delivery: a capture head is ' +
|
|
12
15
|
'returned once. Requires an active linked session (call link_session first).',
|
|
@@ -61,17 +64,33 @@ export async function handleGetMarkerCapture(_args) {
|
|
|
61
64
|
}
|
|
62
65
|
const content = [];
|
|
63
66
|
for (const cap of captures) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
// New collection shape when present; legacy single-address otherwise.
|
|
68
|
+
const head = cap.targets
|
|
69
|
+
? {
|
|
67
70
|
capture_id: cap.capture_id,
|
|
71
|
+
note: cap.note,
|
|
72
|
+
container: cap.container,
|
|
73
|
+
targets: cap.targets,
|
|
74
|
+
total_in_region: cap.total_in_region,
|
|
75
|
+
truncated: cap.truncated,
|
|
76
|
+
created_at: cap.created_at,
|
|
77
|
+
has_crop: cap.has_crop,
|
|
78
|
+
}
|
|
79
|
+
: {
|
|
80
|
+
capture_id: cap.capture_id,
|
|
81
|
+
note: cap.note,
|
|
68
82
|
address: cap.address,
|
|
69
83
|
inputs: cap.inputs,
|
|
70
|
-
note: cap.note,
|
|
71
84
|
created_at: cap.created_at,
|
|
72
85
|
has_crop: cap.has_crop,
|
|
73
|
-
}
|
|
74
|
-
});
|
|
86
|
+
};
|
|
87
|
+
content.push({ type: 'text', text: JSON.stringify(head, null, 2) });
|
|
88
|
+
if (cap.truncated && typeof cap.total_in_region === 'number') {
|
|
89
|
+
content.push({
|
|
90
|
+
type: 'text',
|
|
91
|
+
text: `This region holds ${cap.total_in_region} authorable components; the ${cap.targets?.length ?? 0} most relevant are shown. If the user meant a specific one, ask them to circle a tighter region.`,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
75
94
|
}
|
|
76
95
|
if (data.truncated) {
|
|
77
96
|
content.push({
|