@roxybrowser/openapi 1.0.8 → 1.0.10-beta.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.
- package/README.md +121 -21
- package/lib/cli.d.ts +6 -0
- package/lib/cli.d.ts.map +1 -0
- package/lib/cli.js +51 -0
- package/lib/cli.js.map +1 -0
- package/lib/index.d.ts +515 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -31
- package/lib/index.js.map +1 -1
- package/lib/modules/browser.d.ts +18 -0
- package/lib/modules/browser.d.ts.map +1 -1
- package/lib/modules/browser.js +17 -16
- package/lib/modules/browser.js.map +1 -1
- package/lib/utils/index.d.ts +21 -14
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +42 -16
- package/lib/utils/index.js.map +1 -1
- package/package.json +15 -5
package/lib/index.d.ts
CHANGED
|
@@ -2,8 +2,520 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* RoxyBrowser MCP Server
|
|
4
4
|
*
|
|
5
|
-
* Model Context Protocol server for RoxyBrowser automation
|
|
6
|
-
*
|
|
5
|
+
* Model Context Protocol server for RoxyBrowser automation.
|
|
6
|
+
* Supports: CLI startup, programmatic (in-process) startup, and library usage for secondary development.
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
8
|
+
export declare const TOOLS: ({
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: {
|
|
14
|
+
browsers: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
items: {
|
|
18
|
+
type: string;
|
|
19
|
+
properties: {
|
|
20
|
+
workspaceId: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
windowName: {
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
coreVersion: {
|
|
29
|
+
type: string;
|
|
30
|
+
enum: string[];
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
os: {
|
|
34
|
+
type: string;
|
|
35
|
+
enum: string[];
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
osVersion: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
userAgent: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
cookie: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
items: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
searchEngine: {
|
|
54
|
+
type: string;
|
|
55
|
+
enum: string[];
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
labelIds: {
|
|
59
|
+
type: string;
|
|
60
|
+
items: {
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
defaultOpenUrl: {
|
|
66
|
+
type: string;
|
|
67
|
+
items: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
windowRemark: {
|
|
73
|
+
type: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
projectId: {
|
|
77
|
+
type: string;
|
|
78
|
+
description: string;
|
|
79
|
+
};
|
|
80
|
+
windowPlatformList: {
|
|
81
|
+
type: string;
|
|
82
|
+
items: {
|
|
83
|
+
type: string;
|
|
84
|
+
properties: {
|
|
85
|
+
id: {
|
|
86
|
+
type: string;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
platformUrl: {
|
|
90
|
+
type: string;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
platformUserName: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
platformPassword: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
platformEfa: {
|
|
102
|
+
type: string;
|
|
103
|
+
description: string;
|
|
104
|
+
};
|
|
105
|
+
platformRemarks: {
|
|
106
|
+
type: string;
|
|
107
|
+
description: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
description: string;
|
|
112
|
+
};
|
|
113
|
+
proxyInfo: {
|
|
114
|
+
type: string;
|
|
115
|
+
description: string;
|
|
116
|
+
properties: {
|
|
117
|
+
moduleId: {
|
|
118
|
+
type: string;
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
121
|
+
proxyMethod: {
|
|
122
|
+
type: string;
|
|
123
|
+
enum: string[];
|
|
124
|
+
};
|
|
125
|
+
proxyCategory: {
|
|
126
|
+
type: string;
|
|
127
|
+
enum: string[];
|
|
128
|
+
};
|
|
129
|
+
ipType: {
|
|
130
|
+
type: string;
|
|
131
|
+
enum: string[];
|
|
132
|
+
};
|
|
133
|
+
protocol: {
|
|
134
|
+
type: string;
|
|
135
|
+
enum: string[];
|
|
136
|
+
};
|
|
137
|
+
host: {
|
|
138
|
+
type: string;
|
|
139
|
+
};
|
|
140
|
+
port: {
|
|
141
|
+
type: string;
|
|
142
|
+
};
|
|
143
|
+
proxyUserName: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
proxyPassword: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
refreshUrl: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
checkChannel: {
|
|
153
|
+
type: string;
|
|
154
|
+
enum: string[];
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
fingerInfo: {
|
|
159
|
+
type: string;
|
|
160
|
+
description: string;
|
|
161
|
+
properties: {
|
|
162
|
+
isLanguageBaseIp: {
|
|
163
|
+
type: string;
|
|
164
|
+
description: string;
|
|
165
|
+
};
|
|
166
|
+
language: {
|
|
167
|
+
type: string;
|
|
168
|
+
description: string;
|
|
169
|
+
};
|
|
170
|
+
isDisplayLanguageBaseIp: {
|
|
171
|
+
type: string;
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
174
|
+
displayLanguage: {
|
|
175
|
+
type: string;
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
isTimeZone: {
|
|
179
|
+
type: string;
|
|
180
|
+
description: string;
|
|
181
|
+
};
|
|
182
|
+
timeZone: {
|
|
183
|
+
type: string;
|
|
184
|
+
description: string;
|
|
185
|
+
};
|
|
186
|
+
position: {
|
|
187
|
+
type: string;
|
|
188
|
+
enum: number[];
|
|
189
|
+
description: string;
|
|
190
|
+
};
|
|
191
|
+
isPositionBaseIp: {
|
|
192
|
+
type: string;
|
|
193
|
+
description: string;
|
|
194
|
+
};
|
|
195
|
+
longitude: {
|
|
196
|
+
type: string;
|
|
197
|
+
description: string;
|
|
198
|
+
};
|
|
199
|
+
latitude: {
|
|
200
|
+
type: string;
|
|
201
|
+
description: string;
|
|
202
|
+
};
|
|
203
|
+
precisionPos: {
|
|
204
|
+
type: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
forbidAudio: {
|
|
208
|
+
type: string;
|
|
209
|
+
description: string;
|
|
210
|
+
};
|
|
211
|
+
forbidImage: {
|
|
212
|
+
type: string;
|
|
213
|
+
description: string;
|
|
214
|
+
};
|
|
215
|
+
forbidMedia: {
|
|
216
|
+
type: string;
|
|
217
|
+
description: string;
|
|
218
|
+
};
|
|
219
|
+
openWidth: {
|
|
220
|
+
type: string;
|
|
221
|
+
description: string;
|
|
222
|
+
};
|
|
223
|
+
openHeight: {
|
|
224
|
+
type: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
openBookmarks: {
|
|
228
|
+
type: string;
|
|
229
|
+
description: string;
|
|
230
|
+
};
|
|
231
|
+
positionSwitch: {
|
|
232
|
+
type: string;
|
|
233
|
+
description: string;
|
|
234
|
+
};
|
|
235
|
+
windowRatioPosition: {
|
|
236
|
+
type: string;
|
|
237
|
+
description: string;
|
|
238
|
+
};
|
|
239
|
+
isDisplayName: {
|
|
240
|
+
type: string;
|
|
241
|
+
description: string;
|
|
242
|
+
};
|
|
243
|
+
syncBookmark: {
|
|
244
|
+
type: string;
|
|
245
|
+
description: string;
|
|
246
|
+
};
|
|
247
|
+
syncHistory: {
|
|
248
|
+
type: string;
|
|
249
|
+
description: string;
|
|
250
|
+
};
|
|
251
|
+
syncTab: {
|
|
252
|
+
type: string;
|
|
253
|
+
description: string;
|
|
254
|
+
};
|
|
255
|
+
syncCookie: {
|
|
256
|
+
type: string;
|
|
257
|
+
description: string;
|
|
258
|
+
};
|
|
259
|
+
syncExtensions: {
|
|
260
|
+
type: string;
|
|
261
|
+
description: string;
|
|
262
|
+
};
|
|
263
|
+
syncPassword: {
|
|
264
|
+
type: string;
|
|
265
|
+
description: string;
|
|
266
|
+
};
|
|
267
|
+
syncIndexedDb: {
|
|
268
|
+
type: string;
|
|
269
|
+
description: string;
|
|
270
|
+
};
|
|
271
|
+
syncLocalStorage: {
|
|
272
|
+
type: string;
|
|
273
|
+
description: string;
|
|
274
|
+
};
|
|
275
|
+
clearCacheFile: {
|
|
276
|
+
type: string;
|
|
277
|
+
description: string;
|
|
278
|
+
};
|
|
279
|
+
clearCookie: {
|
|
280
|
+
type: string;
|
|
281
|
+
description: string;
|
|
282
|
+
};
|
|
283
|
+
clearLocalStorage: {
|
|
284
|
+
type: string;
|
|
285
|
+
description: string;
|
|
286
|
+
};
|
|
287
|
+
randomFingerprint: {
|
|
288
|
+
type: string;
|
|
289
|
+
description: string;
|
|
290
|
+
};
|
|
291
|
+
forbidSavePassword: {
|
|
292
|
+
type: string;
|
|
293
|
+
description: string;
|
|
294
|
+
};
|
|
295
|
+
stopOpenNet: {
|
|
296
|
+
type: string;
|
|
297
|
+
description: string;
|
|
298
|
+
};
|
|
299
|
+
stopOpenIP: {
|
|
300
|
+
type: string;
|
|
301
|
+
description: string;
|
|
302
|
+
};
|
|
303
|
+
stopOpenPosition: {
|
|
304
|
+
type: string;
|
|
305
|
+
description: string;
|
|
306
|
+
};
|
|
307
|
+
openWorkbench: {
|
|
308
|
+
type: string;
|
|
309
|
+
enum: number[];
|
|
310
|
+
description: string;
|
|
311
|
+
};
|
|
312
|
+
resolutionType: {
|
|
313
|
+
type: string;
|
|
314
|
+
description: string;
|
|
315
|
+
};
|
|
316
|
+
resolutionX: {
|
|
317
|
+
type: string;
|
|
318
|
+
description: string;
|
|
319
|
+
};
|
|
320
|
+
resolutionY: {
|
|
321
|
+
type: string;
|
|
322
|
+
description: string;
|
|
323
|
+
};
|
|
324
|
+
fontType: {
|
|
325
|
+
type: string;
|
|
326
|
+
description: string;
|
|
327
|
+
};
|
|
328
|
+
webRTC: {
|
|
329
|
+
type: string;
|
|
330
|
+
enum: number[];
|
|
331
|
+
description: string;
|
|
332
|
+
};
|
|
333
|
+
webGL: {
|
|
334
|
+
type: string;
|
|
335
|
+
description: string;
|
|
336
|
+
};
|
|
337
|
+
webGLInfo: {
|
|
338
|
+
type: string;
|
|
339
|
+
description: string;
|
|
340
|
+
};
|
|
341
|
+
webGLManufacturer: {
|
|
342
|
+
type: string;
|
|
343
|
+
description: string;
|
|
344
|
+
};
|
|
345
|
+
webGLRender: {
|
|
346
|
+
type: string;
|
|
347
|
+
description: string;
|
|
348
|
+
};
|
|
349
|
+
webGpu: {
|
|
350
|
+
type: string;
|
|
351
|
+
enum: string[];
|
|
352
|
+
description: string;
|
|
353
|
+
};
|
|
354
|
+
canvas: {
|
|
355
|
+
type: string;
|
|
356
|
+
description: string;
|
|
357
|
+
};
|
|
358
|
+
audioContext: {
|
|
359
|
+
type: string;
|
|
360
|
+
description: string;
|
|
361
|
+
};
|
|
362
|
+
speechVoices: {
|
|
363
|
+
type: string;
|
|
364
|
+
description: string;
|
|
365
|
+
};
|
|
366
|
+
doNotTrack: {
|
|
367
|
+
type: string;
|
|
368
|
+
description: string;
|
|
369
|
+
};
|
|
370
|
+
clientRects: {
|
|
371
|
+
type: string;
|
|
372
|
+
description: string;
|
|
373
|
+
};
|
|
374
|
+
deviceInfo: {
|
|
375
|
+
type: string;
|
|
376
|
+
description: string;
|
|
377
|
+
};
|
|
378
|
+
deviceNameSwitch: {
|
|
379
|
+
type: string;
|
|
380
|
+
description: string;
|
|
381
|
+
};
|
|
382
|
+
macInfo: {
|
|
383
|
+
type: string;
|
|
384
|
+
description: string;
|
|
385
|
+
};
|
|
386
|
+
hardwareConcurrent: {
|
|
387
|
+
type: string;
|
|
388
|
+
description: string;
|
|
389
|
+
};
|
|
390
|
+
deviceMemory: {
|
|
391
|
+
type: string;
|
|
392
|
+
description: string;
|
|
393
|
+
};
|
|
394
|
+
disableSsl: {
|
|
395
|
+
type: string;
|
|
396
|
+
description: string;
|
|
397
|
+
};
|
|
398
|
+
disableSslList: {
|
|
399
|
+
type: string;
|
|
400
|
+
items: {
|
|
401
|
+
type: string;
|
|
402
|
+
};
|
|
403
|
+
description: string;
|
|
404
|
+
};
|
|
405
|
+
portScanProtect: {
|
|
406
|
+
type: string;
|
|
407
|
+
description: string;
|
|
408
|
+
};
|
|
409
|
+
portScanList: {
|
|
410
|
+
type: string;
|
|
411
|
+
description: string;
|
|
412
|
+
};
|
|
413
|
+
useGpu: {
|
|
414
|
+
type: string;
|
|
415
|
+
description: string;
|
|
416
|
+
};
|
|
417
|
+
sandboxPermission: {
|
|
418
|
+
type: string;
|
|
419
|
+
description: string;
|
|
420
|
+
};
|
|
421
|
+
startupParam: {
|
|
422
|
+
type: string;
|
|
423
|
+
description: string;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
required: string[];
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
required: string[];
|
|
433
|
+
};
|
|
434
|
+
} | {
|
|
435
|
+
name: string;
|
|
436
|
+
description: string;
|
|
437
|
+
inputSchema: {
|
|
438
|
+
type: string;
|
|
439
|
+
properties: {
|
|
440
|
+
workspaceId: {
|
|
441
|
+
type: string;
|
|
442
|
+
description: string;
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
required: string[];
|
|
446
|
+
};
|
|
447
|
+
} | {
|
|
448
|
+
name: string;
|
|
449
|
+
description: string;
|
|
450
|
+
inputSchema: {
|
|
451
|
+
type: string;
|
|
452
|
+
properties: {
|
|
453
|
+
dirIds: {
|
|
454
|
+
type: string;
|
|
455
|
+
items: {
|
|
456
|
+
type: string;
|
|
457
|
+
};
|
|
458
|
+
description: string;
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
} | {
|
|
463
|
+
name: string;
|
|
464
|
+
description: string;
|
|
465
|
+
inputSchema: {
|
|
466
|
+
type: string;
|
|
467
|
+
properties: {
|
|
468
|
+
pageIndex: {
|
|
469
|
+
type: string;
|
|
470
|
+
description: string;
|
|
471
|
+
default: number;
|
|
472
|
+
};
|
|
473
|
+
pageSize: {
|
|
474
|
+
type: string;
|
|
475
|
+
description: string;
|
|
476
|
+
default: number;
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
} | {
|
|
481
|
+
name: string;
|
|
482
|
+
description: string;
|
|
483
|
+
inputSchema: {
|
|
484
|
+
type: string;
|
|
485
|
+
properties: {
|
|
486
|
+
includeWorkspaceCheck: {
|
|
487
|
+
type: string;
|
|
488
|
+
description: string;
|
|
489
|
+
default: boolean;
|
|
490
|
+
};
|
|
491
|
+
includeBrowserCheck: {
|
|
492
|
+
type: string;
|
|
493
|
+
description: string;
|
|
494
|
+
default: boolean;
|
|
495
|
+
};
|
|
496
|
+
verbose: {
|
|
497
|
+
type: string;
|
|
498
|
+
description: string;
|
|
499
|
+
default: boolean;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
})[];
|
|
504
|
+
export declare class RoxyBrowserMCPServer {
|
|
505
|
+
private server;
|
|
506
|
+
constructor();
|
|
507
|
+
private setupHandlers;
|
|
508
|
+
run(): Promise<void>;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Create and run MCP server with stdio transport (for in-process usage).
|
|
512
|
+
* Use when embedding the server in your own Node process.
|
|
513
|
+
*/
|
|
514
|
+
export declare function runServer(): Promise<void>;
|
|
515
|
+
export { listBrowsers, batchCreateBrowsers, createBrowser, openBrowser, updateBrowser, closeBrowsers, deleteBrowsers, getBrowserDetail, clearLocalCache, clearServerCache, randomFingerprint, listLabels, getConnectionInfo, } from './modules/browser.js';
|
|
516
|
+
export { proxyList, proxyStore, createProxy, batchCreateProxies, detectProxy, modifyProxy, deleteProxies, } from './modules/proxy.js';
|
|
517
|
+
export { listAccounts, createAccount, batchCreateAccounts, modifyAccount, deleteAccounts, } from './modules/account.js';
|
|
518
|
+
export { listWorkspaces, healthCheck } from './modules/other.js';
|
|
519
|
+
export { request, resolveConfig, DEFAULT_CONFIG } from './utils/index.js';
|
|
520
|
+
export type * from './types.js';
|
|
9
521
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAeH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgCjB,CAAA;AAID,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAQ;;IAiBtB,OAAO,CAAC,aAAa;IAmHf,GAAG;CAQV;AAID;;;GAGG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAG/C;AAID,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,cAAc,GACf,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACzE,mBAAmB,YAAY,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* RoxyBrowser MCP Server
|
|
4
4
|
*
|
|
5
|
-
* Model Context Protocol server for RoxyBrowser automation
|
|
6
|
-
*
|
|
5
|
+
* Model Context Protocol server for RoxyBrowser automation.
|
|
6
|
+
* Supports: CLI startup, programmatic (in-process) startup, and library usage for secondary development.
|
|
7
7
|
*/
|
|
8
8
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
9
9
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
@@ -12,9 +12,8 @@ import { batchCreateAccounts, createAccount, deleteAccounts, listAccounts, modif
|
|
|
12
12
|
import { batchCreateBrowsers, clearLocalCache, clearServerCache, closeBrowsers, createBrowser, deleteBrowsers, getBrowserDetail, getConnectionInfo, listBrowsers, listLabels, openBrowser, randomFingerprint, updateBrowser } from './modules/browser.js';
|
|
13
13
|
import { healthCheck, listWorkspaces } from './modules/other.js';
|
|
14
14
|
import { batchCreateProxies, createProxy, deleteProxies, detectProxy, modifyProxy, proxyList, proxyStore } from './modules/proxy.js';
|
|
15
|
-
import { ConfigError } from './types.js';
|
|
16
15
|
// ========== Tool Definitions ==========
|
|
17
|
-
const TOOLS = [
|
|
16
|
+
export const TOOLS = [
|
|
18
17
|
listBrowsers.schema,
|
|
19
18
|
batchCreateBrowsers.schema,
|
|
20
19
|
createBrowser.schema,
|
|
@@ -45,7 +44,7 @@ const TOOLS = [
|
|
|
45
44
|
healthCheck.schema,
|
|
46
45
|
];
|
|
47
46
|
// ========== MCP Server ==========
|
|
48
|
-
class RoxyBrowserMCPServer {
|
|
47
|
+
export class RoxyBrowserMCPServer {
|
|
49
48
|
server;
|
|
50
49
|
constructor() {
|
|
51
50
|
this.server = new Server({
|
|
@@ -57,9 +56,6 @@ class RoxyBrowserMCPServer {
|
|
|
57
56
|
},
|
|
58
57
|
});
|
|
59
58
|
this.setupHandlers();
|
|
60
|
-
// Initialize RoxyBrowser client
|
|
61
|
-
// const config = getConfig()
|
|
62
|
-
// this.roxyClient = new RoxyClient(config)
|
|
63
59
|
}
|
|
64
60
|
setupHandlers() {
|
|
65
61
|
// List available tools
|
|
@@ -153,28 +149,19 @@ class RoxyBrowserMCPServer {
|
|
|
153
149
|
console.error('✅ RoxyBrowser MCP Server is running');
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
|
-
// ==========
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
console.error(`❌ Configuration Error: ${error.message}`);
|
|
165
|
-
process.exit(1);
|
|
166
|
-
}
|
|
167
|
-
console.error('❌ Unexpected error:', error);
|
|
168
|
-
process.exit(1);
|
|
169
|
-
}
|
|
152
|
+
// ========== Programmatic API ==========
|
|
153
|
+
/**
|
|
154
|
+
* Create and run MCP server with stdio transport (for in-process usage).
|
|
155
|
+
* Use when embedding the server in your own Node process.
|
|
156
|
+
*/
|
|
157
|
+
export async function runServer() {
|
|
158
|
+
const server = new RoxyBrowserMCPServer();
|
|
159
|
+
await server.run();
|
|
170
160
|
}
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
console.error('Fatal error:', error);
|
|
178
|
-
process.exit(1);
|
|
179
|
-
});
|
|
161
|
+
// ========== Library exports for secondary development ==========
|
|
162
|
+
export { listBrowsers, batchCreateBrowsers, createBrowser, openBrowser, updateBrowser, closeBrowsers, deleteBrowsers, getBrowserDetail, clearLocalCache, clearServerCache, randomFingerprint, listLabels, getConnectionInfo, } from './modules/browser.js';
|
|
163
|
+
export { proxyList, proxyStore, createProxy, batchCreateProxies, detectProxy, modifyProxy, deleteProxies, } from './modules/proxy.js';
|
|
164
|
+
export { listAccounts, createAccount, batchCreateAccounts, modifyAccount, deleteAccounts, } from './modules/account.js';
|
|
165
|
+
export { listWorkspaces, healthCheck } from './modules/other.js';
|
|
166
|
+
export { request, resolveConfig, DEFAULT_CONFIG } from './utils/index.js';
|
|
180
167
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings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