@cgaspard/webappmcp 0.1.4 → 0.1.6
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.
- package/README.md +25 -1
- package/dist/browser.js +168 -30
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/client/devtools.d.ts.map +1 -1
- package/dist/client/devtools.js +7 -6
- package/dist/client/devtools.js.map +1 -1
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +161 -24
- package/dist/client/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.d.ts +40 -0
- package/dist/middleware/index.d.ts.map +1 -1
- package/dist/middleware/index.js +164 -47
- package/dist/middleware/index.js.map +1 -1
- package/dist/middleware/mcp-sse-server.d.ts +5 -8
- package/dist/middleware/mcp-sse-server.d.ts.map +1 -1
- package/dist/middleware/mcp-sse-server.js +89 -145
- package/dist/middleware/mcp-sse-server.js.map +1 -1
- package/dist/middleware/tools/capture.js +3 -3
- package/dist/middleware/tools/capture.js.map +1 -1
- package/dist/middleware/tools/dom.js +4 -4
- package/dist/middleware/tools/dom.js.map +1 -1
- package/dist/middleware/tools/execute.js +1 -1
- package/dist/middleware/tools/execute.js.map +1 -1
- package/dist/middleware/tools/interaction.js +4 -4
- package/dist/middleware/tools/interaction.js.map +1 -1
- package/dist/middleware/tools/routing.d.ts +3 -0
- package/dist/middleware/tools/routing.d.ts.map +1 -0
- package/dist/middleware/tools/routing.js +76 -0
- package/dist/middleware/tools/routing.js.map +1 -0
- package/dist/middleware/tools/state.js +4 -4
- package/dist/middleware/tools/state.js.map +1 -1
- package/package.json +2 -1
|
@@ -4,42 +4,51 @@ exports.MCPSSEServer = void 0;
|
|
|
4
4
|
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
5
5
|
const sse_js_1 = require("@modelcontextprotocol/sdk/server/sse.js");
|
|
6
6
|
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
7
|
-
const ws_1 = require("ws");
|
|
8
7
|
const index_js_2 = require("./tools/index.js");
|
|
9
8
|
class MCPSSEServer {
|
|
10
9
|
constructor(config) {
|
|
11
|
-
this.ws = null;
|
|
12
|
-
this.isConnected = false;
|
|
13
10
|
this.sseTransports = new Map();
|
|
14
|
-
this.wsUrl = config.wsUrl;
|
|
15
|
-
this.authToken = config.authToken;
|
|
16
11
|
this.getClients = config.getClients;
|
|
12
|
+
this.executeTool = config.executeTool;
|
|
17
13
|
this.debug = config.debug ?? false;
|
|
14
|
+
this.plugins = config.plugins ?? [];
|
|
18
15
|
}
|
|
19
16
|
log(...args) {
|
|
20
17
|
if (this.debug) {
|
|
21
|
-
console.log('[
|
|
18
|
+
console.log('[webappmcp]', ...args);
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
logError(...args) {
|
|
25
22
|
// Always log errors
|
|
26
|
-
console.error('[
|
|
23
|
+
console.error('[webappmcp]', ...args);
|
|
27
24
|
}
|
|
28
25
|
createServer() {
|
|
29
26
|
const server = new index_js_1.Server({
|
|
30
27
|
name: 'webapp-mcp-sse',
|
|
31
28
|
version: '0.1.0',
|
|
29
|
+
description: 'MCP server connected to a running web application instance. This server provides direct access to the DOM, state, and functionality of the currently connected web app.',
|
|
32
30
|
}, {
|
|
33
31
|
capabilities: {
|
|
34
32
|
tools: {},
|
|
33
|
+
prompts: {},
|
|
35
34
|
},
|
|
36
35
|
});
|
|
37
36
|
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
38
37
|
this.log(`ListTools request received`);
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
const builtInTools = (0, index_js_2.registerTools)();
|
|
39
|
+
// Convert plugin tools to MCP format
|
|
40
|
+
const pluginTools = this.plugins.flatMap(plugin => (plugin.tools || []).map(tool => ({
|
|
41
|
+
name: tool.name,
|
|
42
|
+
description: tool.description,
|
|
43
|
+
inputSchema: tool.inputSchema || {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {},
|
|
46
|
+
},
|
|
47
|
+
})));
|
|
48
|
+
const allTools = [...builtInTools, ...pluginTools];
|
|
49
|
+
this.log(`Returning ${allTools.length} tools (${builtInTools.length} built-in, ${pluginTools.length} from plugins)`);
|
|
41
50
|
return {
|
|
42
|
-
tools:
|
|
51
|
+
tools: allTools,
|
|
43
52
|
};
|
|
44
53
|
});
|
|
45
54
|
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
@@ -63,15 +72,64 @@ class MCPSSEServer {
|
|
|
63
72
|
this.log(`webapp_list_clients result:`, JSON.stringify(result, null, 2));
|
|
64
73
|
return result;
|
|
65
74
|
}
|
|
66
|
-
if
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
// Check if this is a plugin tool
|
|
76
|
+
for (const plugin of this.plugins) {
|
|
77
|
+
const pluginTool = plugin.tools?.find(t => t.name === name);
|
|
78
|
+
if (pluginTool) {
|
|
79
|
+
this.log(`Executing plugin tool ${name} from plugin ${plugin.name}`);
|
|
80
|
+
try {
|
|
81
|
+
const context = {
|
|
82
|
+
executeClientTool: this.executeTool || (async () => { throw new Error('Client tool execution not available'); }),
|
|
83
|
+
getClients: this.getClients || (() => []),
|
|
84
|
+
log: this.log.bind(this),
|
|
85
|
+
};
|
|
86
|
+
const result = await pluginTool.handler(args || {}, context);
|
|
87
|
+
this.log(`Plugin tool ${name} execution completed`);
|
|
88
|
+
return {
|
|
89
|
+
content: [
|
|
90
|
+
{
|
|
91
|
+
type: 'text',
|
|
92
|
+
text: typeof result === 'string' ? result : JSON.stringify(result, null, 2),
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
this.log(`Plugin tool ${name} execution failed:`, error);
|
|
99
|
+
return {
|
|
100
|
+
content: [
|
|
101
|
+
{
|
|
102
|
+
type: 'text',
|
|
103
|
+
text: `Error executing plugin tool: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (!this.executeTool) {
|
|
111
|
+
this.log(`No tool execution function provided`);
|
|
112
|
+
return {
|
|
113
|
+
content: [
|
|
114
|
+
{
|
|
115
|
+
type: 'text',
|
|
116
|
+
text: 'Tool execution not available. Please check middleware configuration.',
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
};
|
|
69
120
|
}
|
|
70
121
|
try {
|
|
71
|
-
this.log(`Executing tool ${name}
|
|
72
|
-
const result = await this.
|
|
122
|
+
this.log(`Executing tool ${name} via middleware`);
|
|
123
|
+
const result = await this.executeTool(name, args);
|
|
73
124
|
this.log(`Tool ${name} execution completed with result:`, JSON.stringify(result, null, 2));
|
|
74
|
-
return
|
|
125
|
+
return {
|
|
126
|
+
content: [
|
|
127
|
+
{
|
|
128
|
+
type: 'text',
|
|
129
|
+
text: JSON.stringify(result, null, 2),
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
};
|
|
75
133
|
}
|
|
76
134
|
catch (error) {
|
|
77
135
|
this.log(`Tool ${name} execution failed:`, error);
|
|
@@ -87,83 +145,12 @@ class MCPSSEServer {
|
|
|
87
145
|
});
|
|
88
146
|
return server;
|
|
89
147
|
}
|
|
90
|
-
async connectWebSocket() {
|
|
91
|
-
return new Promise((resolve, reject) => {
|
|
92
|
-
const wsUrl = this.authToken
|
|
93
|
-
? `${this.wsUrl}?token=${this.authToken}`
|
|
94
|
-
: this.wsUrl;
|
|
95
|
-
this.ws = new ws_1.WebSocket(wsUrl);
|
|
96
|
-
this.ws.on('open', () => {
|
|
97
|
-
this.log('Connected to WebSocket');
|
|
98
|
-
this.isConnected = true;
|
|
99
|
-
this.ws.send(JSON.stringify({
|
|
100
|
-
type: 'init',
|
|
101
|
-
url: 'mcp-sse-server',
|
|
102
|
-
}));
|
|
103
|
-
resolve();
|
|
104
|
-
});
|
|
105
|
-
this.ws.on('message', (data) => {
|
|
106
|
-
const message = JSON.parse(data.toString());
|
|
107
|
-
if (message.type === 'connected') {
|
|
108
|
-
this.log(`Registered with clientId: ${message.clientId}`);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
this.ws.on('close', () => {
|
|
112
|
-
this.log('Disconnected from WebSocket');
|
|
113
|
-
this.isConnected = false;
|
|
114
|
-
});
|
|
115
|
-
this.ws.on('error', (error) => {
|
|
116
|
-
this.logError('WebSocket error:', error);
|
|
117
|
-
reject(error);
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
async executeToolOnClient(toolName, args) {
|
|
122
|
-
return new Promise((resolve, reject) => {
|
|
123
|
-
const requestId = Math.random().toString(36).substring(7);
|
|
124
|
-
this.log(`Executing tool ${toolName} on client with requestId: ${requestId}`);
|
|
125
|
-
this.log(`Tool arguments:`, JSON.stringify(args));
|
|
126
|
-
const timeout = setTimeout(() => {
|
|
127
|
-
this.log(`Tool execution timeout for requestId: ${requestId}`);
|
|
128
|
-
reject(new Error('Tool execution timeout'));
|
|
129
|
-
}, 30000);
|
|
130
|
-
const messageHandler = (data) => {
|
|
131
|
-
const message = JSON.parse(data.toString());
|
|
132
|
-
this.log(`Received WebSocket message:`, JSON.stringify(message));
|
|
133
|
-
if (message.requestId === requestId) {
|
|
134
|
-
clearTimeout(timeout);
|
|
135
|
-
this.ws.off('message', messageHandler);
|
|
136
|
-
this.log(`Tool response received for requestId: ${requestId}`);
|
|
137
|
-
if (message.error) {
|
|
138
|
-
reject(new Error(message.error));
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
resolve({
|
|
142
|
-
content: [
|
|
143
|
-
{
|
|
144
|
-
type: 'text',
|
|
145
|
-
text: JSON.stringify(message.result, null, 2),
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
this.ws.on('message', messageHandler);
|
|
153
|
-
const executeMessage = {
|
|
154
|
-
type: 'execute_tool',
|
|
155
|
-
requestId,
|
|
156
|
-
tool: toolName,
|
|
157
|
-
args,
|
|
158
|
-
};
|
|
159
|
-
this.log(`Sending execute_tool message:`, JSON.stringify(executeMessage));
|
|
160
|
-
this.ws.send(JSON.stringify(executeMessage));
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
148
|
async initialize() {
|
|
164
149
|
try {
|
|
165
|
-
|
|
166
|
-
|
|
150
|
+
this.log('Initializing SSE server...');
|
|
151
|
+
// Don't require WebSocket connection during initialization
|
|
152
|
+
// The connection will be established when needed for tool execution
|
|
153
|
+
this.log('SSE server initialized successfully (WebSocket connection deferred)');
|
|
167
154
|
}
|
|
168
155
|
catch (error) {
|
|
169
156
|
this.logError('Failed to initialize server:', error);
|
|
@@ -171,93 +158,50 @@ class MCPSSEServer {
|
|
|
171
158
|
}
|
|
172
159
|
}
|
|
173
160
|
async handleSSERequest(req, res) {
|
|
174
|
-
|
|
175
|
-
this.log(`\n[${timestamp}] ====== INCOMING REQUEST ======`);
|
|
176
|
-
this.log(`[${timestamp}] ${req.method} ${req.url}`);
|
|
177
|
-
this.log(`[${timestamp}] Path: ${req.path}`);
|
|
178
|
-
this.log(`[${timestamp}] Query:`, req.query);
|
|
179
|
-
console.log(`[${timestamp}] [MCP SSE] Headers:`, JSON.stringify(req.headers, null, 2));
|
|
180
|
-
console.log(`[${timestamp}] [MCP SSE] User-Agent: ${req.headers['user-agent']}`);
|
|
181
|
-
console.log(`[${timestamp}] [MCP SSE] Content-Type: ${req.headers['content-type']}`);
|
|
182
|
-
console.log(`[${timestamp}] [MCP SSE] Accept: ${req.headers['accept']}`);
|
|
183
|
-
// Log authorization header specifically
|
|
184
|
-
const authHeader = req.headers.authorization;
|
|
185
|
-
if (authHeader) {
|
|
186
|
-
console.log(`[${timestamp}] [MCP SSE] Authorization header present: ${authHeader}`);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
console.log(`[MCP SSE] No authorization header found`);
|
|
190
|
-
}
|
|
161
|
+
this.log(`${req.method} ${req.path}`);
|
|
191
162
|
try {
|
|
192
163
|
if (req.method === 'GET') {
|
|
193
|
-
console.log(`[MCP SSE] Creating new server instance for GET request`);
|
|
194
164
|
// Create a new server instance for this connection
|
|
195
165
|
const server = this.createServer();
|
|
196
166
|
// Create SSE transport for this request
|
|
197
|
-
console.log(`[MCP SSE] Creating SSE transport for endpoint /mcp/sse`);
|
|
198
167
|
const sseTransport = new sse_js_1.SSEServerTransport('/mcp/sse', res);
|
|
199
|
-
// Log what the SSE transport is sending
|
|
200
|
-
console.log(`[MCP SSE] SSE Transport created with sessionId: ${sseTransport.sessionId}`);
|
|
201
|
-
// Override the send method to log messages
|
|
202
|
-
const originalSend = sseTransport.send.bind(sseTransport);
|
|
203
|
-
sseTransport.send = async (message) => {
|
|
204
|
-
console.log(`[MCP SSE] Sending SSE message:`, JSON.stringify(message));
|
|
205
|
-
return originalSend(message);
|
|
206
|
-
};
|
|
207
|
-
// Connect the server to the SSE transport (this automatically calls start())
|
|
208
|
-
console.log(`[MCP SSE] Connecting server to SSE transport`);
|
|
209
168
|
try {
|
|
210
|
-
|
|
211
|
-
|
|
169
|
+
// Add timeout to prevent hanging
|
|
170
|
+
const connectPromise = server.connect(sseTransport);
|
|
171
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
172
|
+
setTimeout(() => reject(new Error('Server connection timeout')), 10000);
|
|
173
|
+
});
|
|
174
|
+
await Promise.race([connectPromise, timeoutPromise]);
|
|
175
|
+
this.log(`Client connected: ${sseTransport.sessionId}`);
|
|
212
176
|
}
|
|
213
177
|
catch (connectError) {
|
|
214
|
-
|
|
178
|
+
this.logError(`ERROR connecting server to transport:`, connectError);
|
|
215
179
|
throw connectError;
|
|
216
180
|
}
|
|
217
181
|
// Store the transport with its session ID
|
|
218
182
|
this.sseTransports.set(sseTransport.sessionId, sseTransport);
|
|
219
|
-
console.log(`[MCP SSE] Server connected to client: ${sseTransport.sessionId}`);
|
|
220
|
-
console.log(`[MCP SSE] Active SSE transports: ${this.sseTransports.size}`);
|
|
221
|
-
console.log(`[MCP SSE] SSE endpoint should be: /mcp/sse?sessionId=${sseTransport.sessionId}`);
|
|
222
183
|
// Handle connection close
|
|
223
184
|
req.on('close', () => {
|
|
224
185
|
this.sseTransports.delete(sseTransport.sessionId);
|
|
225
|
-
|
|
226
|
-
console.log(`[MCP SSE] Active SSE transports: ${this.sseTransports.size}`);
|
|
186
|
+
this.log(`Client disconnected: ${sseTransport.sessionId}`);
|
|
227
187
|
});
|
|
228
188
|
}
|
|
229
189
|
else if (req.method === 'POST') {
|
|
230
190
|
// Extract session ID from URL params
|
|
231
191
|
const sessionId = req.query.sessionId;
|
|
232
|
-
console.log(`[MCP SSE] POST request for session: ${sessionId}`);
|
|
233
192
|
if (!sessionId) {
|
|
234
|
-
console.log(`[MCP SSE] No session ID provided in POST request`);
|
|
235
193
|
return res.status(400).json({ error: 'Session ID required for POST requests' });
|
|
236
194
|
}
|
|
237
195
|
const sseTransport = this.sseTransports.get(sessionId);
|
|
238
196
|
if (!sseTransport) {
|
|
239
|
-
console.log(`[MCP SSE] Session not found: ${sessionId}`);
|
|
240
|
-
console.log(`[MCP SSE] Available sessions: ${Array.from(this.sseTransports.keys()).join(', ')}`);
|
|
241
197
|
return res.status(404).json({ error: 'SSE session not found' });
|
|
242
198
|
}
|
|
243
|
-
console.log(`[MCP SSE] Handling POST message for session: ${sessionId}`);
|
|
244
|
-
// Add logging to see what's being posted
|
|
245
|
-
const originalWrite = res.write;
|
|
246
|
-
const originalEnd = res.end;
|
|
247
|
-
res.write = function (...args) {
|
|
248
|
-
console.log(`[MCP SSE] Response write:`, args[0]);
|
|
249
|
-
return originalWrite.apply(res, args);
|
|
250
|
-
};
|
|
251
|
-
res.end = function (...args) {
|
|
252
|
-
console.log(`[MCP SSE] Response end:`, args[0]);
|
|
253
|
-
return originalEnd.apply(res, args);
|
|
254
|
-
};
|
|
255
199
|
// Handle incoming POST messages (don't consume the body here - let SSE transport handle it)
|
|
256
200
|
await sseTransport.handlePostMessage(req, res);
|
|
257
201
|
}
|
|
258
202
|
}
|
|
259
203
|
catch (error) {
|
|
260
|
-
|
|
204
|
+
this.logError(`Failed to handle SSE request:`, error);
|
|
261
205
|
if (!res.headersSent) {
|
|
262
206
|
res.status(500).json({ error: 'Failed to establish SSE connection' });
|
|
263
207
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-sse-server.js","sourceRoot":"","sources":["../../src/middleware/mcp-sse-server.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AACnE,oEAA6E;AAC7E,iEAG4C;AAC5C
|
|
1
|
+
{"version":3,"file":"mcp-sse-server.js","sourceRoot":"","sources":["../../src/middleware/mcp-sse-server.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AACnE,oEAA6E;AAC7E,iEAG4C;AAC5C,+CAAiD;AAWjD,MAAa,YAAY;IAOvB,YAAY,MAAoB;QANxB,kBAAa,GAAG,IAAI,GAAG,EAA8B,CAAC;QAO5D,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,CAAC;IAEO,GAAG,CAAC,GAAG,IAAW;QACxB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAEO,QAAQ,CAAC,GAAG,IAAW;QAC7B,oBAAoB;QACpB,OAAO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ureTools = [
|
|
5
5
|
{
|
|
6
6
|
name: 'capture_screenshot',
|
|
7
|
-
description: 'Take a screenshot of the
|
|
7
|
+
description: 'Take a screenshot of the connected web app. Can capture either the visible viewport or the entire page including content below the fold.',
|
|
8
8
|
inputSchema: {
|
|
9
9
|
type: 'object',
|
|
10
10
|
properties: {
|
|
11
11
|
fullPage: {
|
|
12
12
|
type: 'boolean',
|
|
13
|
-
description: '
|
|
13
|
+
description: 'true = capture entire page height (including scrolled content), false = capture only visible viewport',
|
|
14
14
|
default: true,
|
|
15
15
|
},
|
|
16
16
|
format: {
|
|
@@ -28,7 +28,7 @@ exports.captureTools = [
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
name: 'capture_element_screenshot',
|
|
31
|
-
description: 'Take a screenshot of a specific element',
|
|
31
|
+
description: 'Take a screenshot of a specific element in the running web application',
|
|
32
32
|
inputSchema: {
|
|
33
33
|
type: 'object',
|
|
34
34
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../src/middleware/tools/capture.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../src/middleware/tools/capture.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,0IAA0I;QACvJ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,uGAAuG;oBACpH,OAAO,EAAE,IAAI;iBACd;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;oBACrB,WAAW,EAAE,cAAc;oBAC3B,OAAO,EAAE,KAAK;iBACf;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qFAAqF;iBACnG;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,wEAAwE;QACrF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yCAAyC;iBACvD;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;oBACrB,WAAW,EAAE,cAAc;oBAC3B,OAAO,EAAE,KAAK;iBACf;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qFAAqF;iBACnG;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;CACF,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.domTools = void 0;
|
|
|
4
4
|
exports.domTools = [
|
|
5
5
|
{
|
|
6
6
|
name: 'dom_query',
|
|
7
|
-
description: 'Query DOM elements using CSS selectors',
|
|
7
|
+
description: 'Query DOM elements in the currently connected web application using CSS selectors. Returns live element data from the running app.',
|
|
8
8
|
inputSchema: {
|
|
9
9
|
type: 'object',
|
|
10
10
|
properties: {
|
|
@@ -23,7 +23,7 @@ exports.domTools = [
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
name: 'dom_get_properties',
|
|
26
|
-
description: 'Get properties and attributes of a DOM element',
|
|
26
|
+
description: 'Get real-time properties and attributes of a DOM element in the running web application',
|
|
27
27
|
inputSchema: {
|
|
28
28
|
type: 'object',
|
|
29
29
|
properties: {
|
|
@@ -44,7 +44,7 @@ exports.domTools = [
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
name: 'dom_get_text',
|
|
47
|
-
description: 'Get text content of DOM elements',
|
|
47
|
+
description: 'Get the current text content of DOM elements in the live web application',
|
|
48
48
|
inputSchema: {
|
|
49
49
|
type: 'object',
|
|
50
50
|
properties: {
|
|
@@ -63,7 +63,7 @@ exports.domTools = [
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
name: 'dom_get_html',
|
|
66
|
-
description: 'Get HTML content of DOM elements',
|
|
66
|
+
description: 'Get the current HTML content of DOM elements from the running web application',
|
|
67
67
|
inputSchema: {
|
|
68
68
|
type: 'object',
|
|
69
69
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../../src/middleware/tools/dom.ts"],"names":[],"mappings":";;;AAEa,QAAA,QAAQ,GAAqB;IACxC;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../../src/middleware/tools/dom.ts"],"names":[],"mappings":";;;AAEa,QAAA,QAAQ,GAAqB;IACxC;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,oIAAoI;QACjJ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gCAAgC;iBAC9C;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,sCAAsC;oBACnD,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,yFAAyF;QACtG,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8BAA8B;iBAC5C;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;qBACf;oBACD,WAAW,EAAE,gCAAgC;iBAC9C;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,0EAA0E;QACvF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,mCAAmC;oBAChD,OAAO,EAAE,KAAK;iBACf;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,+EAA+E;QAC5F,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8BAA8B;iBAC5C;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,oCAAoC;oBACjD,OAAO,EAAE,KAAK;iBACf;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;CACF,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.executeTools = void 0;
|
|
|
4
4
|
exports.executeTools = [
|
|
5
5
|
{
|
|
6
6
|
name: 'execute_javascript',
|
|
7
|
-
description: 'Execute JavaScript code in the
|
|
7
|
+
description: 'Execute JavaScript code in the context of the currently connected web application',
|
|
8
8
|
inputSchema: {
|
|
9
9
|
type: 'object',
|
|
10
10
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/middleware/tools/execute.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/middleware/tools/execute.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,mFAAmF;QAChG,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,4BAA4B;iBAC1C;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,+CAA+C;oBAC5D,OAAO,EAAE,KAAK;iBACf;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,mCAAmC;oBAChD,OAAO,EAAE,KAAK;iBACf;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;KACF;CACF,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.interactionTools = void 0;
|
|
|
4
4
|
exports.interactionTools = [
|
|
5
5
|
{
|
|
6
6
|
name: 'interaction_click',
|
|
7
|
-
description: 'Click on a DOM element',
|
|
7
|
+
description: 'Click on a DOM element in the live web application',
|
|
8
8
|
inputSchema: {
|
|
9
9
|
type: 'object',
|
|
10
10
|
properties: {
|
|
@@ -24,7 +24,7 @@ exports.interactionTools = [
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
name: 'interaction_type',
|
|
27
|
-
description: 'Type text into an input field',
|
|
27
|
+
description: 'Type text into an input field in the running web application',
|
|
28
28
|
inputSchema: {
|
|
29
29
|
type: 'object',
|
|
30
30
|
properties: {
|
|
@@ -47,7 +47,7 @@ exports.interactionTools = [
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
name: 'interaction_scroll',
|
|
50
|
-
description: 'Scroll the page or an element',
|
|
50
|
+
description: 'Scroll the page or an element in the currently connected web application',
|
|
51
51
|
inputSchema: {
|
|
52
52
|
type: 'object',
|
|
53
53
|
properties: {
|
|
@@ -71,7 +71,7 @@ exports.interactionTools = [
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
name: 'interaction_hover',
|
|
74
|
-
description: 'Hover over a DOM element',
|
|
74
|
+
description: 'Hover over a DOM element in the live web application to trigger hover effects',
|
|
75
75
|
inputSchema: {
|
|
76
76
|
type: 'object',
|
|
77
77
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/middleware/tools/interaction.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAqB;IAChD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/middleware/tools/interaction.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAqB;IAChD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,oDAAoD;QACjE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uCAAuC;iBACrD;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;oBACjC,WAAW,EAAE,qBAAqB;oBAClC,OAAO,EAAE,MAAM;iBAChB;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,8DAA8D;QAC3E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oCAAoC;iBAClD;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,cAAc;iBAC5B;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,+BAA+B;oBAC5C,OAAO,EAAE,KAAK;iBACf;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;SAC/B;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,0EAA0E;QACvF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6EAA6E;iBAC3F;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;oBACrC,WAAW,EAAE,kBAAkB;iBAChC;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,4BAA4B;oBACzC,OAAO,EAAE,GAAG;iBACb;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,+EAA+E;QAC5F,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,4CAA4C;iBAC1D;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../../src/middleware/tools/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,cAAc,EAuExC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.routingTools = void 0;
|
|
4
|
+
exports.routingTools = [
|
|
5
|
+
{
|
|
6
|
+
name: 'routing_get_current',
|
|
7
|
+
description: 'Get the current route information',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
clientId: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'Client ID to get route from (optional, uses first available browser if not specified)',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'routing_navigate',
|
|
20
|
+
description: 'Navigate to a specific route',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
path: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'The route path to navigate to',
|
|
27
|
+
},
|
|
28
|
+
params: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
description: 'Route parameters (optional)',
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
description: 'Query parameters (optional)',
|
|
35
|
+
},
|
|
36
|
+
clientId: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Client ID to navigate (optional, uses first available browser if not specified)',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
required: ['path'],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'routing_list_routes',
|
|
46
|
+
description: 'List all available routes in the application',
|
|
47
|
+
inputSchema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
clientId: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'Client ID to list routes from (optional, uses first available browser if not specified)',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'routing_get_history',
|
|
59
|
+
description: 'Get the navigation history',
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
limit: {
|
|
64
|
+
type: 'number',
|
|
65
|
+
description: 'Maximum number of history entries to return',
|
|
66
|
+
default: 10,
|
|
67
|
+
},
|
|
68
|
+
clientId: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
description: 'Client ID to get history from (optional, uses first available browser if not specified)',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
//# sourceMappingURL=routing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../src/middleware/tools/routing.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,mCAAmC;QAChD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uFAAuF;iBACrG;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,8BAA8B;QAC3C,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6BAA6B;iBAC3C;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6BAA6B;iBAC3C;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,iFAAiF;iBAC/F;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;KACF;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,8CAA8C;QAC3D,WAAW,EAAE;YAC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