@anvailabs/agentbrowser-mcp 1.7.0 → 1.8.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 +17 -6
- package/dist/bin.js +2952 -380
- package/dist/index.js +2814 -259
- package/dist/mcp-server.d.ts +13 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +118 -36
- package/dist/mcp-server.js.map +1 -1
- package/package.json +17 -16
- package/LICENSE +0 -201
package/dist/mcp-server.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* The message handler is pure: it takes a JSON-RPC line and returns a
|
|
9
9
|
* JSON-RPC line (or null for notifications), so any transport can drive it.
|
|
10
10
|
*/
|
|
11
|
-
import type { ActionRequest, ActionResult, ArtifactRef, ClientOptions, ExportedCookie, ExtractRequest, ExtractResult, NavigationRequest, NavigationResponse, ObservationRequest, ObservationResponse, PageResponse, PdfRequest, ScreenshotRequest, SessionRequest, SessionResponse } from '@agentbrowser/sdk-typescript';
|
|
11
|
+
import type { ActionRequest, ActionResult, ArtifactRef, ClientOptions, ExportedCookie, ExtractRequest, ExtractResult, NavigationRequest, NavigationResponse, ObservationRequest, ObservationResponse, PageResponse, PageSnapshot, PdfRequest, ScreenshotRequest, SessionRequest, SessionResponse } from '@agentbrowser/sdk-typescript';
|
|
12
12
|
export type { ClientOptions, ExportedCookie };
|
|
13
13
|
/** The slice of the SDK the MCP server depends on. */
|
|
14
14
|
export interface McpClient {
|
|
@@ -17,6 +17,18 @@ export interface McpClient {
|
|
|
17
17
|
close(sessionId: string): Promise<void>;
|
|
18
18
|
/** TD-BROWSER-6: scoped cookie export for the credential handoff loop. */
|
|
19
19
|
cookies(sessionId: string): Promise<ExportedCookie[]>;
|
|
20
|
+
plan(sessionId: string, pageId: string, actions: Array<Record<string, unknown>>): Promise<{
|
|
21
|
+
ok: boolean;
|
|
22
|
+
completed: number;
|
|
23
|
+
results: Array<{
|
|
24
|
+
step: number;
|
|
25
|
+
ok: boolean;
|
|
26
|
+
error?: string;
|
|
27
|
+
}>;
|
|
28
|
+
mode?: string;
|
|
29
|
+
}>;
|
|
30
|
+
/** TD-BROWSER-8: self-contained snapshot payload for one-shot LLM reasoning. */
|
|
31
|
+
snapshot(sessionId: string, pageId: string): Promise<PageSnapshot>;
|
|
20
32
|
createPage(sessionId: string): Promise<PageResponse>;
|
|
21
33
|
navigate(sessionId: string, pageId: string, request: NavigationRequest): Promise<NavigationResponse>;
|
|
22
34
|
observe(sessionId: string, pageId: string, request: ObservationRequest): Promise<ObservationResponse>;
|
package/dist/mcp-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAGtC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAE9C,sDAAsD;AACtD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE;QACR,MAA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,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QAChG,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;QAC5F,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;KACnF,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IAChD,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,mEAAmE;IACnE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC9C;AAWD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,SAAS,CAgf/D"}
|
package/dist/mcp-server.js
CHANGED
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
* The message handler is pure: it takes a JSON-RPC line and returns a
|
|
9
9
|
* JSON-RPC line (or null for notifications), so any transport can drive it.
|
|
10
10
|
*/
|
|
11
|
-
import { DELIVERED_ACTION_TYPES } from '@agentbrowser/protocol';
|
|
11
|
+
import { DELIVERED_ACTION_TYPES, UsageError, formatErrorForUser } from '@agentbrowser/protocol';
|
|
12
|
+
import { DELIVERED_EXTRACT_FORMATS, REF_PATTERN } from '@agentbrowser/sdk-typescript';
|
|
12
13
|
const PROTOCOL_VERSION = '2024-11-05';
|
|
13
|
-
/** Element refs are the only interaction handle - selectors are never accepted. */
|
|
14
|
-
const REF_PATTERN = '^e\\d+_\\d+$';
|
|
15
14
|
/**
|
|
16
15
|
* Build the MCP server with its tool catalog.
|
|
17
16
|
*/
|
|
@@ -19,7 +18,13 @@ export function buildMcpServer(deps) {
|
|
|
19
18
|
const client = deps.createClient({ baseUrl: deps.baseUrl ?? 'http://localhost:3000' });
|
|
20
19
|
const serverInfo = deps.serverInfo ?? { name: 'agentbrowser', version: '1.0.0' };
|
|
21
20
|
const sessionAndPage = (args) => {
|
|
22
|
-
|
|
21
|
+
if (typeof args.sessionId !== 'string' || args.sessionId.length === 0) {
|
|
22
|
+
throw new UsageError('sessionId is required and must be a non-empty string.');
|
|
23
|
+
}
|
|
24
|
+
if (typeof args.pageId !== 'string' || args.pageId.length === 0) {
|
|
25
|
+
throw new UsageError('pageId is required and must be a non-empty string.');
|
|
26
|
+
}
|
|
27
|
+
return [args.sessionId, args.pageId];
|
|
23
28
|
};
|
|
24
29
|
const tools = [
|
|
25
30
|
{
|
|
@@ -57,7 +62,10 @@ export function buildMcpServer(deps) {
|
|
|
57
62
|
required: ['tenantId'],
|
|
58
63
|
},
|
|
59
64
|
handler: async (args) => {
|
|
60
|
-
|
|
65
|
+
if (typeof args.tenantId !== 'string' || args.tenantId.length === 0) {
|
|
66
|
+
throw new UsageError('tenantId is required and must be a non-empty string.');
|
|
67
|
+
}
|
|
68
|
+
const request = { tenantId: args.tenantId };
|
|
61
69
|
if (typeof args.engine === 'string')
|
|
62
70
|
request.engine = args.engine;
|
|
63
71
|
if (typeof args.headless === 'boolean')
|
|
@@ -83,9 +91,62 @@ export function buildMcpServer(deps) {
|
|
|
83
91
|
required: ['sessionId'],
|
|
84
92
|
},
|
|
85
93
|
handler: async (args) => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
if (typeof args.sessionId !== 'string' || args.sessionId.length === 0) {
|
|
95
|
+
throw new UsageError('sessionId is required and must be a non-empty string.');
|
|
96
|
+
}
|
|
97
|
+
const cookies = await client.sessions.cookies(args.sessionId);
|
|
98
|
+
return { sessionId: args.sessionId, cookies };
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'browser_snapshot',
|
|
103
|
+
description: 'Get a self-contained page snapshot for one-shot plan construction (TD-BROWSER-8): ' +
|
|
104
|
+
'url, title, revision, an adaptive `mode` (stable|verified - verified means recent ' +
|
|
105
|
+
'ref churn was detected and browser_plan will require a stricter role+label match ' +
|
|
106
|
+
'before self-healing a stale ref), and fields ({ref, role, label}) to address in a ' +
|
|
107
|
+
'browser_plan call. Prefer browser_snapshot + browser_plan over repeated ' +
|
|
108
|
+
'browser_observe/browser_act round-trips when filling multi-field forms.',
|
|
109
|
+
inputSchema: {
|
|
110
|
+
type: 'object',
|
|
111
|
+
properties: {
|
|
112
|
+
sessionId: { type: 'string' },
|
|
113
|
+
pageId: { type: 'string' },
|
|
114
|
+
},
|
|
115
|
+
required: ['sessionId', 'pageId'],
|
|
116
|
+
},
|
|
117
|
+
handler: async (args) => {
|
|
118
|
+
const [sessionId, pageId] = sessionAndPage(args);
|
|
119
|
+
return await client.sessions.snapshot(sessionId, pageId);
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'browser_plan',
|
|
124
|
+
description: 'Execute a batched action plan in one call (TD-BROWSER-8). Each action: ' +
|
|
125
|
+
'{action: fill|click|press|scroll, target?: {ref}, value?, key?}. Steps run ' +
|
|
126
|
+
'sequentially; the first hard failure aborts with per-step results. Best paired ' +
|
|
127
|
+
'with browser_snapshot: address refs from its `fields` in one round trip.',
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
sessionId: { type: 'string' },
|
|
132
|
+
pageId: { type: 'string' },
|
|
133
|
+
actions: {
|
|
134
|
+
type: 'array',
|
|
135
|
+
description: 'Ordered plan steps: {action, target?: {ref}, value?, key?}',
|
|
136
|
+
items: { type: 'object' },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
required: ['sessionId', 'pageId', 'actions'],
|
|
140
|
+
},
|
|
141
|
+
handler: async (args) => {
|
|
142
|
+
const [sessionId, pageId] = sessionAndPage(args);
|
|
143
|
+
// Schema-only validation is not enforcement: a client that ignores
|
|
144
|
+
// inputSchema must still get a usage error, not a silently empty
|
|
145
|
+
// plan that reports ok with zero steps executed.
|
|
146
|
+
if (!Array.isArray(args.actions)) {
|
|
147
|
+
throw new UsageError('actions is required and must be an array of plan steps.');
|
|
148
|
+
}
|
|
149
|
+
return await client.sessions.plan(sessionId, pageId, args.actions);
|
|
89
150
|
},
|
|
90
151
|
},
|
|
91
152
|
{
|
|
@@ -97,8 +158,11 @@ export function buildMcpServer(deps) {
|
|
|
97
158
|
required: ['sessionId'],
|
|
98
159
|
},
|
|
99
160
|
handler: async (args) => {
|
|
100
|
-
|
|
101
|
-
|
|
161
|
+
if (typeof args.sessionId !== 'string' || args.sessionId.length === 0) {
|
|
162
|
+
throw new UsageError('sessionId is required and must be a non-empty string.');
|
|
163
|
+
}
|
|
164
|
+
await client.sessions.close(args.sessionId);
|
|
165
|
+
return { sessionId: args.sessionId, closed: true };
|
|
102
166
|
},
|
|
103
167
|
},
|
|
104
168
|
{
|
|
@@ -168,7 +232,9 @@ export function buildMcpServer(deps) {
|
|
|
168
232
|
},
|
|
169
233
|
{
|
|
170
234
|
name: 'browser_act',
|
|
171
|
-
description: 'Perform an action on an element by ref: click,
|
|
235
|
+
description: 'Perform an action on an element by ref: click, dblclick, hover, fill, clear, ' +
|
|
236
|
+
'check, uncheck, select, scroll, press, wait, goBack, goForward, reload, or ' +
|
|
237
|
+
'handle a dialog. ' +
|
|
172
238
|
'Elements are addressed by the ref from browser_observe, never by CSS selector or ' +
|
|
173
239
|
'XPath. If the page changed since the observation, the action fails with ' +
|
|
174
240
|
'STALE_TARGET: call browser_observe again and use the new refs; do not retry the old one.',
|
|
@@ -186,7 +252,7 @@ export function buildMcpServer(deps) {
|
|
|
186
252
|
properties: {
|
|
187
253
|
ref: {
|
|
188
254
|
type: 'string',
|
|
189
|
-
pattern: REF_PATTERN,
|
|
255
|
+
pattern: REF_PATTERN.source,
|
|
190
256
|
description: 'Element ref from browser_observe, e.g. e1_0.',
|
|
191
257
|
},
|
|
192
258
|
},
|
|
@@ -196,18 +262,37 @@ export function buildMcpServer(deps) {
|
|
|
196
262
|
key: { type: 'string', description: 'Key for press.' },
|
|
197
263
|
direction: { type: 'string', enum: ['up', 'down', 'left', 'right'] },
|
|
198
264
|
amount: { type: 'number' },
|
|
265
|
+
condition: {
|
|
266
|
+
type: 'object',
|
|
267
|
+
description: 'Wait-action condition (action: "wait" only).',
|
|
268
|
+
properties: {
|
|
269
|
+
until: {
|
|
270
|
+
type: 'string',
|
|
271
|
+
enum: ['settled', 'domcontentloaded', 'load', 'networkidle'],
|
|
272
|
+
},
|
|
273
|
+
timeoutMs: { type: 'number' },
|
|
274
|
+
},
|
|
275
|
+
required: ['until'],
|
|
276
|
+
},
|
|
199
277
|
},
|
|
200
278
|
required: ['sessionId', 'pageId', 'action'],
|
|
201
279
|
},
|
|
202
280
|
handler: async (args) => {
|
|
203
281
|
const [sessionId, pageId] = sessionAndPage(args);
|
|
204
282
|
const target = (args.target ?? {});
|
|
205
|
-
//
|
|
206
|
-
// is
|
|
207
|
-
const
|
|
283
|
+
// These actions carry no target; ref validation applies only when
|
|
284
|
+
// a target is expected.
|
|
285
|
+
const UNTARGETED_ACTIONS = new Set([
|
|
286
|
+
'acceptDialog',
|
|
287
|
+
'dismissDialog',
|
|
288
|
+
'wait',
|
|
289
|
+
'goBack',
|
|
290
|
+
'goForward',
|
|
291
|
+
'reload',
|
|
292
|
+
]);
|
|
208
293
|
const ref = target.ref;
|
|
209
|
-
if (!
|
|
210
|
-
(typeof ref !== 'string' || !
|
|
294
|
+
if (!UNTARGETED_ACTIONS.has(String(args.action)) &&
|
|
295
|
+
(typeof ref !== 'string' || !REF_PATTERN.test(ref))) {
|
|
211
296
|
throw new UsageError(`Invalid element reference '${String(ref)}'. Expected a ref of the form e<revision>_<ordinal>, such as e1_0. Call browser_observe to list current refs.`);
|
|
212
297
|
}
|
|
213
298
|
const request = {
|
|
@@ -222,6 +307,9 @@ export function buildMcpServer(deps) {
|
|
|
222
307
|
request.direction = args.direction;
|
|
223
308
|
if (typeof args.amount === 'number')
|
|
224
309
|
request.amount = args.amount;
|
|
310
|
+
if (args.condition !== undefined && typeof args.condition === 'object') {
|
|
311
|
+
request.condition = args.condition;
|
|
312
|
+
}
|
|
225
313
|
return await client.sessions.executeAction(sessionId, pageId, request);
|
|
226
314
|
},
|
|
227
315
|
},
|
|
@@ -239,22 +327,29 @@ export function buildMcpServer(deps) {
|
|
|
239
327
|
pageId: { type: 'string' },
|
|
240
328
|
format: {
|
|
241
329
|
type: 'string',
|
|
242
|
-
enum: [
|
|
330
|
+
enum: [...DELIVERED_EXTRACT_FORMATS],
|
|
243
331
|
description: 'What to extract (default: text).',
|
|
244
332
|
},
|
|
333
|
+
schema: {
|
|
334
|
+
type: 'object',
|
|
335
|
+
description: 'JSON Schema constraining the extraction (format: "schema" only): ' +
|
|
336
|
+
'properties to pick, with type/description/enum constraints.',
|
|
337
|
+
},
|
|
245
338
|
},
|
|
246
339
|
required: ['sessionId', 'pageId', 'format'],
|
|
247
340
|
},
|
|
248
341
|
handler: async (args) => {
|
|
249
342
|
const [sessionId, pageId] = sessionAndPage(args);
|
|
250
343
|
const format = args.format;
|
|
251
|
-
const supported =
|
|
344
|
+
const supported = DELIVERED_EXTRACT_FORMATS;
|
|
252
345
|
if (typeof format !== 'string' || !supported.includes(format)) {
|
|
253
346
|
throw new UsageError(`Unknown extraction format '${String(format)}'. Supported: ${supported.join(', ')}.`);
|
|
254
347
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
348
|
+
const request = { format: format };
|
|
349
|
+
if (args.schema !== undefined && typeof args.schema === 'object') {
|
|
350
|
+
request.schema = args.schema;
|
|
351
|
+
}
|
|
352
|
+
return await client.sessions.extract(sessionId, pageId, request);
|
|
258
353
|
},
|
|
259
354
|
},
|
|
260
355
|
{
|
|
@@ -368,9 +463,6 @@ export function buildMcpServer(deps) {
|
|
|
368
463
|
},
|
|
369
464
|
};
|
|
370
465
|
}
|
|
371
|
-
/** Raised for input the server can reject before touching the API. */
|
|
372
|
-
class UsageError extends Error {
|
|
373
|
-
}
|
|
374
466
|
function requireHttpUrl(value) {
|
|
375
467
|
const url = typeof value === 'string' ? value : '';
|
|
376
468
|
if (!/^https?:\/\//.test(url)) {
|
|
@@ -390,17 +482,7 @@ function errorResult(message) {
|
|
|
390
482
|
};
|
|
391
483
|
}
|
|
392
484
|
function formatToolError(error) {
|
|
393
|
-
|
|
394
|
-
return error.message;
|
|
395
|
-
}
|
|
396
|
-
if (error instanceof Error) {
|
|
397
|
-
const code = error.code;
|
|
398
|
-
if (code === 'STALE_TARGET') {
|
|
399
|
-
return `${error.message}\n\nThe element ref is stale. Call browser_observe to get fresh refs at the current revision, then act on the new ref. Do not retry the old one.`;
|
|
400
|
-
}
|
|
401
|
-
return code && !error.message.startsWith(code) ? `${code}: ${error.message}` : error.message;
|
|
402
|
-
}
|
|
403
|
-
return String(error);
|
|
485
|
+
return formatErrorForUser(error, 'The element ref is stale. Call browser_observe to get fresh refs at the current revision, then act on the new ref. Do not retry the old one.');
|
|
404
486
|
}
|
|
405
487
|
function ok(id, result) {
|
|
406
488
|
return JSON.stringify({ jsonrpc: '2.0', id, result });
|
package/dist/mcp-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AA2DhE,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAEtC,mFAAmF;AACnF,MAAM,WAAW,GAAG,cAAc,CAAC;AASnC;;GAEG;AACH,MAAM,UAAU,cAAc,C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I,CAAC;AACJ,CAAC;AAED,SAAS,EAAE,CAAC,EAAmB,EAAE,MAAe;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,KAAK,CAAC,EAA0B,EAAE,IAAY,EAAE,OAAe;IACtE,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;AAC1E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anvailabs/agentbrowser-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server exposing AgentBrowser as high-level, safe, composable tools (talks to an AgentBrowser service via AGENTBROWSER_BASE_URL)",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"agentbrowser-mcp": "dist/bin.js"
|
|
10
10
|
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc && esbuild dist/bin.js --bundle --platform=node --format=esm --outfile=dist/bin.bundled.js && mv dist/bin.bundled.js dist/bin.js && esbuild dist/index.js --bundle --platform=node --format=esm --outfile=dist/index.bundled.js && mv dist/index.bundled.js dist/index.js",
|
|
13
|
+
"type-check": "tsc --noEmit",
|
|
14
|
+
"compile": "node scripts/compile.mjs",
|
|
15
|
+
"smoke": "node scripts/smoke.mjs dist-bin/agentbrowser-mcp",
|
|
16
|
+
"test": "vitest run",
|
|
17
|
+
"test:watch": "vitest",
|
|
18
|
+
"lint": "biome check src/",
|
|
19
|
+
"format": "biome format --write src/",
|
|
20
|
+
"clean": "rm -rf dist dist-bin *.tsbuildinfo",
|
|
21
|
+
"prepublishOnly": "pnpm build"
|
|
22
|
+
},
|
|
11
23
|
"dependencies": {},
|
|
12
24
|
"devDependencies": {
|
|
13
25
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -15,8 +27,8 @@
|
|
|
15
27
|
"esbuild": "^0.28.2",
|
|
16
28
|
"typescript": "^5.7.2",
|
|
17
29
|
"vitest": "^2.1.9",
|
|
18
|
-
"@agentbrowser/protocol": "
|
|
19
|
-
"@agentbrowser/sdk-typescript": "
|
|
30
|
+
"@agentbrowser/protocol": "workspace:*",
|
|
31
|
+
"@agentbrowser/sdk-typescript": "workspace:*"
|
|
20
32
|
},
|
|
21
33
|
"files": [
|
|
22
34
|
"dist"
|
|
@@ -32,16 +44,5 @@
|
|
|
32
44
|
"url": "git+https://github.com/anvai-labs/agentbrowser.git",
|
|
33
45
|
"directory": "packages/mcp-server"
|
|
34
46
|
},
|
|
35
|
-
"license": "Apache-2.0"
|
|
36
|
-
|
|
37
|
-
"build": "tsc && esbuild dist/bin.js --bundle --platform=node --format=esm --outfile=dist/bin.bundled.js && mv dist/bin.bundled.js dist/bin.js && esbuild dist/index.js --bundle --platform=node --format=esm --outfile=dist/index.bundled.js && mv dist/index.bundled.js dist/index.js",
|
|
38
|
-
"type-check": "tsc --noEmit",
|
|
39
|
-
"compile": "node scripts/compile.mjs",
|
|
40
|
-
"smoke": "node scripts/smoke.mjs dist-bin/agentbrowser-mcp",
|
|
41
|
-
"test": "vitest run",
|
|
42
|
-
"test:watch": "vitest",
|
|
43
|
-
"lint": "biome check src/",
|
|
44
|
-
"format": "biome format --write src/",
|
|
45
|
-
"clean": "rm -rf dist dist-bin *.tsbuildinfo"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
47
|
+
"license": "Apache-2.0"
|
|
48
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|