@runsnative/mcp-server 0.2.0 → 0.3.0
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,13 +4,28 @@ const CROP_PREFIX = 'data:image/png;base64,';
|
|
|
4
4
|
export const GET_MARKER_CAPTURE_TOOL = {
|
|
5
5
|
name: 'get_marker_capture',
|
|
6
6
|
description: 'Fetch pending marker captures from the linked runsnative.org tab — regions the user circled ' +
|
|
7
|
-
'with the marker overlay.
|
|
8
|
-
'
|
|
9
|
-
'
|
|
7
|
+
'with the marker overlay. Use when the user says they marked, circled, or pointed at something ' +
|
|
8
|
+
'on the site, or asks "can you see what I selected?". Each capture carries the resolved ' +
|
|
9
|
+
'component-instance address (usable with set_instance_variant), its render inputs, an optional ' +
|
|
10
|
+
'user note, and the pixel crop as an image so you see exactly what they saw. Single delivery: a ' +
|
|
11
|
+
'capture is returned once. Requires an active linked session (call link_session first).',
|
|
10
12
|
inputSchema: {
|
|
11
13
|
type: 'object',
|
|
12
14
|
properties: {},
|
|
13
15
|
},
|
|
16
|
+
// LSP §5.1 (linked-session-protocol-v0.1, mukadra repo) — session-targeting,
|
|
17
|
+
// but the READ leg of the bridge: it drains the session's capture queue
|
|
18
|
+
// rather than enacting a command, so there is no allow-list `enactment`
|
|
19
|
+
// (the field is optional per §5.1).
|
|
20
|
+
_meta: {
|
|
21
|
+
lsp: {
|
|
22
|
+
target: 'session',
|
|
23
|
+
tier: 'reversible',
|
|
24
|
+
consent: 'implicit',
|
|
25
|
+
entitlement: 'free',
|
|
26
|
+
visibility: 'advertised',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
14
29
|
};
|
|
15
30
|
export async function handleGetMarkerCapture(_args) {
|
|
16
31
|
const pairId = getLinkedPairId();
|
package/dist/tools/navigate.js
CHANGED
|
@@ -2,8 +2,11 @@ import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
|
2
2
|
import { postWorkerApi, getLinkedPairId } from '../bridge-client.js';
|
|
3
3
|
export const NAVIGATE_TOOL = {
|
|
4
4
|
name: 'navigate',
|
|
5
|
-
description:
|
|
6
|
-
'
|
|
5
|
+
description: "Send the user's linked runsnative.org tab to a different page. Use when the user asks to see, open, or go to " +
|
|
6
|
+
'something on the site — a component page, a docs section, the gallery — so they watch their own tab move ' +
|
|
7
|
+
'instead of following a pasted link. The command is enqueued and the tab navigates within one poll interval. ' +
|
|
8
|
+
'Reversible — the user can navigate back. Requires an active linked session (call link_session first). ' +
|
|
9
|
+
'Slash shim: /rn-go <path>.',
|
|
7
10
|
inputSchema: {
|
|
8
11
|
type: 'object',
|
|
9
12
|
properties: {
|
|
@@ -11,6 +14,19 @@ export const NAVIGATE_TOOL = {
|
|
|
11
14
|
},
|
|
12
15
|
required: ['path'],
|
|
13
16
|
},
|
|
17
|
+
// LSP §5.1 (linked-session-protocol-v0.1, mukadra repo) — marks this as a
|
|
18
|
+
// session-targeting capability. `enactment` names the worker allow-list
|
|
19
|
+
// entry this tool submits (JUNE-626).
|
|
20
|
+
_meta: {
|
|
21
|
+
lsp: {
|
|
22
|
+
target: 'session',
|
|
23
|
+
tier: 'reversible',
|
|
24
|
+
consent: 'implicit',
|
|
25
|
+
entitlement: 'free',
|
|
26
|
+
visibility: 'advertised',
|
|
27
|
+
enactment: 'navigation.navigate',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
14
30
|
};
|
|
15
31
|
export async function handleNavigate(args) {
|
|
16
32
|
const path = args['path'];
|
|
@@ -4,9 +4,11 @@ import { postWorkerApi, getLinkedPairId } from '../bridge-client.js';
|
|
|
4
4
|
const RUN_BUTTON_VARIANTS = ['primary', 'secondary', 'outline', 'ghost', 'danger', 'link'];
|
|
5
5
|
export const SET_INSTANCE_VARIANT_TOOL = {
|
|
6
6
|
name: 'set_instance_variant',
|
|
7
|
-
description: '
|
|
8
|
-
'
|
|
9
|
-
'
|
|
7
|
+
description: 'Restyle ONE specific run-button on the linked runsnative.org tab — the instance the user circled with the ' +
|
|
8
|
+
'marker overlay — leaving every other element untouched. Use after get_marker_capture hands you an ' +
|
|
9
|
+
'address.instanceId and the user wants that exact button tried in a different variant. The command is enqueued ' +
|
|
10
|
+
'and the tab applies it within one poll interval, if the instance is still on the page. Reversible — set it ' +
|
|
11
|
+
'back at any time. Requires an active linked session (call link_session first). Slash shim: /rn-set-variant.',
|
|
10
12
|
inputSchema: {
|
|
11
13
|
type: 'object',
|
|
12
14
|
properties: {
|
|
@@ -21,6 +23,19 @@ export const SET_INSTANCE_VARIANT_TOOL = {
|
|
|
21
23
|
},
|
|
22
24
|
required: ['instance_id', 'variant'],
|
|
23
25
|
},
|
|
26
|
+
// LSP §5.1 (linked-session-protocol-v0.1, mukadra repo) — marks this as a
|
|
27
|
+
// session-targeting capability. `enactment` names the worker allow-list
|
|
28
|
+
// entry this tool submits (JUNE-626).
|
|
29
|
+
_meta: {
|
|
30
|
+
lsp: {
|
|
31
|
+
target: 'session',
|
|
32
|
+
tier: 'reversible',
|
|
33
|
+
consent: 'implicit',
|
|
34
|
+
entitlement: 'free',
|
|
35
|
+
visibility: 'advertised',
|
|
36
|
+
enactment: 'instance.setVariant',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
24
39
|
};
|
|
25
40
|
export async function handleSetInstanceVariant(args) {
|
|
26
41
|
const instanceId = args['instance_id'];
|
package/dist/tools/set-theme.js
CHANGED
|
@@ -2,8 +2,11 @@ import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
|
2
2
|
import { postWorkerApi, getLinkedPairId } from '../bridge-client.js';
|
|
3
3
|
export const SET_THEME_TOOL = {
|
|
4
4
|
name: 'set_theme',
|
|
5
|
-
description:
|
|
6
|
-
'
|
|
5
|
+
description: "Restyle the user's linked runsnative.org tab with a named theme — colors, surfaces, and typography change live " +
|
|
6
|
+
'in their browser. Use when the user asks to change how the site looks, try a different brand feel, or compare ' +
|
|
7
|
+
'palettes. The command is enqueued and the tab applies it within one poll interval; nothing is saved — fully ' +
|
|
8
|
+
'reversible, switch again or back at any time. Requires an active linked session (call link_session first). ' +
|
|
9
|
+
'Slash shim: /rn-theme <theme>.',
|
|
7
10
|
inputSchema: {
|
|
8
11
|
type: 'object',
|
|
9
12
|
properties: {
|
|
@@ -11,6 +14,19 @@ export const SET_THEME_TOOL = {
|
|
|
11
14
|
},
|
|
12
15
|
required: ['theme'],
|
|
13
16
|
},
|
|
17
|
+
// LSP §5.1 (linked-session-protocol-v0.1, mukadra repo) — marks this as a
|
|
18
|
+
// session-targeting capability. `enactment` names the worker allow-list
|
|
19
|
+
// entry this tool submits (JUNE-626).
|
|
20
|
+
_meta: {
|
|
21
|
+
lsp: {
|
|
22
|
+
target: 'session',
|
|
23
|
+
tier: 'reversible',
|
|
24
|
+
consent: 'implicit',
|
|
25
|
+
entitlement: 'free',
|
|
26
|
+
visibility: 'advertised',
|
|
27
|
+
enactment: 'theme.setTheme',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
14
30
|
};
|
|
15
31
|
export async function handleSetTheme(args) {
|
|
16
32
|
const theme = args['theme'];
|