cbrowser 18.21.0 → 18.23.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/dist/analysis/agent-ready-audit.d.ts.map +1 -1
- package/dist/analysis/agent-ready-audit.js +16 -1
- package/dist/analysis/agent-ready-audit.js.map +1 -1
- package/dist/cli.js +74 -16
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +5 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -2
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/lightpanda.d.ts +67 -19
- package/dist/lightpanda.d.ts.map +1 -1
- package/dist/lightpanda.js +164 -41
- package/dist/lightpanda.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +3 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-tools/base/analysis-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/analysis-tools.js +14 -0
- package/dist/mcp-tools/base/analysis-tools.js.map +1 -1
- package/dist/mcp-tools/base/browser-management-tools.d.ts +1 -1
- package/dist/mcp-tools/base/browser-management-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/browser-management-tools.js +4 -3
- package/dist/mcp-tools/base/browser-management-tools.js.map +1 -1
- package/dist/mcp-tools/types.d.ts +2 -0
- package/dist/mcp-tools/types.d.ts.map +1 -1
- package/dist/personas.d.ts +35 -0
- package/dist/personas.d.ts.map +1 -1
- package/dist/personas.js +99 -0
- package/dist/personas.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/lightpanda.js
CHANGED
|
@@ -12,8 +12,15 @@
|
|
|
12
12
|
* This module provides CDP-based integration with Playwright, allowing
|
|
13
13
|
* CBrowser to use Lightpanda as an alternative browser backend.
|
|
14
14
|
*
|
|
15
|
+
* ⚠️ SECURITY NOTICE:
|
|
16
|
+
* - Lightpanda is BETA software with no formal security audit
|
|
17
|
+
* - No SECURITY.md or vulnerability disclosure policy
|
|
18
|
+
* - Cloud mode routes traffic through lightpanda.io servers
|
|
19
|
+
* - Never use for credential handling or sensitive operations
|
|
20
|
+
*
|
|
15
21
|
* @see https://lightpanda.io/
|
|
16
|
-
* @
|
|
22
|
+
* @see https://github.com/lightpanda-io/browser
|
|
23
|
+
* @since 18.20.0
|
|
17
24
|
*/
|
|
18
25
|
import { chromium } from "playwright";
|
|
19
26
|
/**
|
|
@@ -32,30 +39,67 @@ export function getLightpandaConfig() {
|
|
|
32
39
|
endpoint: process.env.LIGHTPANDA_ENDPOINT,
|
|
33
40
|
token: process.env.LIGHTPANDA_TOKEN,
|
|
34
41
|
timeout: parseInt(process.env.LIGHTPANDA_TIMEOUT || "30000", 10) || 30000,
|
|
42
|
+
explicitOptIn: false, // Must be explicitly set
|
|
35
43
|
};
|
|
36
44
|
}
|
|
37
45
|
/**
|
|
38
|
-
* Check if Lightpanda is configured
|
|
46
|
+
* Check if Lightpanda is configured (env vars set)
|
|
39
47
|
*/
|
|
40
48
|
export function isLightpandaConfigured() {
|
|
41
49
|
const config = getLightpandaConfig();
|
|
42
|
-
// Configured if either local endpoint is set, or cloud token is provided
|
|
43
50
|
return !!(config.endpoint || config.token);
|
|
44
51
|
}
|
|
45
52
|
/**
|
|
46
|
-
* Check if
|
|
53
|
+
* Check if an operation is sensitive and should never use Lightpanda
|
|
54
|
+
*/
|
|
55
|
+
export function isSensitiveOperation(operation) {
|
|
56
|
+
if (!operation)
|
|
57
|
+
return false;
|
|
58
|
+
const lower = operation.toLowerCase();
|
|
59
|
+
const sensitivePatterns = [
|
|
60
|
+
"auth",
|
|
61
|
+
"login",
|
|
62
|
+
"credential",
|
|
63
|
+
"payment",
|
|
64
|
+
"checkout",
|
|
65
|
+
"password",
|
|
66
|
+
"2fa",
|
|
67
|
+
"mfa",
|
|
68
|
+
"oauth",
|
|
69
|
+
];
|
|
70
|
+
return sensitivePatterns.some((pattern) => lower.includes(pattern));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Check if Lightpanda should be used for the current operation
|
|
74
|
+
*
|
|
75
|
+
* SECURITY: Lightpanda is OPT-IN ONLY. It will NOT be used automatically
|
|
76
|
+
* even if configured. The caller must explicitly set explicitOptIn: true.
|
|
47
77
|
*
|
|
48
|
-
* Lightpanda is
|
|
49
|
-
* -
|
|
50
|
-
* -
|
|
78
|
+
* Lightpanda is suitable for:
|
|
79
|
+
* - Agent-ready audits (public page analysis)
|
|
80
|
+
* - Empathy audits (accessibility testing)
|
|
81
|
+
* - Web scraping of public content
|
|
51
82
|
* - Performance-critical batch operations
|
|
52
83
|
*
|
|
53
84
|
* Lightpanda is NOT suitable for:
|
|
54
|
-
* -
|
|
55
|
-
* -
|
|
56
|
-
* -
|
|
85
|
+
* - Any authentication flows
|
|
86
|
+
* - Credential handling
|
|
87
|
+
* - Payment/checkout flows
|
|
88
|
+
* - Visual regression testing
|
|
89
|
+
* - Cross-browser testing
|
|
57
90
|
*/
|
|
58
91
|
export function shouldUseLightpanda(options) {
|
|
92
|
+
// SECURITY: Require explicit opt-in
|
|
93
|
+
if (!options.explicitOptIn) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
// SECURITY: Block sensitive operations
|
|
97
|
+
if (isSensitiveOperation(options.operation)) {
|
|
98
|
+
if (process.env.CBROWSER_VERBOSE === "true") {
|
|
99
|
+
console.log(`⚠️ Lightpanda blocked for sensitive operation: ${options.operation}`);
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
59
103
|
// Only use Lightpanda for headless chromium operations
|
|
60
104
|
if (options.browserType && options.browserType !== "chromium") {
|
|
61
105
|
return false;
|
|
@@ -107,18 +151,39 @@ export async function checkLightpandaAvailability(endpoint = LIGHTPANDA_LOCAL_EN
|
|
|
107
151
|
return false;
|
|
108
152
|
}
|
|
109
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Get security warning for cloud mode
|
|
156
|
+
*/
|
|
157
|
+
function getCloudSecurityWarning() {
|
|
158
|
+
return `
|
|
159
|
+
⚠️ CLOUD MODE SECURITY WARNING:
|
|
160
|
+
Your browser traffic will be routed through lightpanda.io servers.
|
|
161
|
+
They can see: URLs visited, page content, cookies, and form data.
|
|
162
|
+
|
|
163
|
+
DO NOT use cloud mode for:
|
|
164
|
+
• Authentication flows
|
|
165
|
+
• Handling credentials or passwords
|
|
166
|
+
• Payment or checkout processes
|
|
167
|
+
• Any sensitive data
|
|
168
|
+
|
|
169
|
+
For sensitive operations, use local Lightpanda or Playwright Chromium.
|
|
170
|
+
`.trim();
|
|
171
|
+
}
|
|
110
172
|
/**
|
|
111
173
|
* Connect to Lightpanda via CDP
|
|
112
174
|
*
|
|
113
175
|
* Lightpanda exposes a Chrome DevTools Protocol (CDP) interface,
|
|
114
176
|
* which Playwright can connect to using chromium.connectOverCDP().
|
|
115
177
|
*
|
|
178
|
+
* ⚠️ SECURITY: Cloud connections route traffic through lightpanda.io.
|
|
179
|
+
* Never use for sensitive operations.
|
|
180
|
+
*
|
|
116
181
|
* @example
|
|
117
182
|
* ```typescript
|
|
118
|
-
* // Local Lightpanda instance
|
|
183
|
+
* // Local Lightpanda instance (recommended)
|
|
119
184
|
* const result = await connectToLightpanda({ endpoint: "ws://127.0.0.1:9222" });
|
|
120
185
|
*
|
|
121
|
-
* // Lightpanda Cloud
|
|
186
|
+
* // Lightpanda Cloud (⚠️ traffic visible to lightpanda.io)
|
|
122
187
|
* const result = await connectToLightpanda({ token: "your-api-token" });
|
|
123
188
|
* ```
|
|
124
189
|
*/
|
|
@@ -126,17 +191,23 @@ export async function connectToLightpanda(config) {
|
|
|
126
191
|
const cfg = config || getLightpandaConfig();
|
|
127
192
|
const endpoint = buildLightpandaUrl(cfg);
|
|
128
193
|
const isCloud = endpoint.includes("cloud.lightpanda.io");
|
|
194
|
+
// Add security warning for cloud mode
|
|
195
|
+
const securityWarning = isCloud ? getCloudSecurityWarning() : undefined;
|
|
196
|
+
if (isCloud && process.env.CBROWSER_VERBOSE === "true") {
|
|
197
|
+
console.log(securityWarning);
|
|
198
|
+
}
|
|
129
199
|
try {
|
|
130
200
|
// Use Playwright's CDP connection
|
|
131
201
|
const browser = await chromium.connectOverCDP(endpoint, {
|
|
132
202
|
timeout: cfg.timeout || 30000,
|
|
133
203
|
});
|
|
134
|
-
console.log(`🐼 Connected to Lightpanda ${isCloud ? "(Cloud)" : "(Local)"}`);
|
|
204
|
+
console.log(`🐼 Connected to Lightpanda ${isCloud ? "(Cloud ⚠️)" : "(Local)"}`);
|
|
135
205
|
return {
|
|
136
206
|
success: true,
|
|
137
207
|
browser,
|
|
138
208
|
endpoint,
|
|
139
209
|
isCloud,
|
|
210
|
+
securityWarning,
|
|
140
211
|
};
|
|
141
212
|
}
|
|
142
213
|
catch (error) {
|
|
@@ -146,31 +217,39 @@ export async function connectToLightpanda(config) {
|
|
|
146
217
|
error: `Failed to connect to Lightpanda at ${endpoint}: ${message}`,
|
|
147
218
|
endpoint,
|
|
148
219
|
isCloud,
|
|
220
|
+
securityWarning,
|
|
149
221
|
};
|
|
150
222
|
}
|
|
151
223
|
}
|
|
152
224
|
/**
|
|
153
|
-
* Launch a browser with Lightpanda
|
|
225
|
+
* Launch a browser with Lightpanda (OPT-IN ONLY)
|
|
154
226
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
227
|
+
* ⚠️ SECURITY: Lightpanda is NOT used automatically. You must explicitly
|
|
228
|
+
* set explicitOptIn: true to use it. This is a security measure because:
|
|
229
|
+
* - Lightpanda is beta software with no security audit
|
|
230
|
+
* - Cloud mode exposes traffic to third party
|
|
231
|
+
* - It should never be used for sensitive operations
|
|
157
232
|
*
|
|
158
233
|
* @example
|
|
159
234
|
* ```typescript
|
|
160
|
-
* //
|
|
161
|
-
* const browser = await launchWithLightpandaFallback({
|
|
162
|
-
*
|
|
235
|
+
* // Explicit opt-in required
|
|
236
|
+
* const { browser, isLightpanda } = await launchWithLightpandaFallback({
|
|
237
|
+
* headless: true,
|
|
238
|
+
* explicitOptIn: true, // Required!
|
|
239
|
+
* operation: "agent-ready-audit", // Checked against sensitive patterns
|
|
240
|
+
* });
|
|
163
241
|
* ```
|
|
164
242
|
*/
|
|
165
243
|
export async function launchWithLightpandaFallback(options) {
|
|
166
|
-
const { headless = true, requiresVisualAccuracy = false, browserType = "chromium", launchOptions = {} } = options;
|
|
167
|
-
// Check if we should try Lightpanda
|
|
168
|
-
if (shouldUseLightpanda({ headless, requiresVisualAccuracy, browserType })) {
|
|
244
|
+
const { headless = true, requiresVisualAccuracy = false, browserType = "chromium", launchOptions = {}, explicitOptIn = false, operation, } = options;
|
|
245
|
+
// Check if we should try Lightpanda (requires explicit opt-in)
|
|
246
|
+
if (shouldUseLightpanda({ headless, requiresVisualAccuracy, browserType, explicitOptIn, operation })) {
|
|
169
247
|
const result = await connectToLightpanda();
|
|
170
248
|
if (result.success && result.browser) {
|
|
171
249
|
return {
|
|
172
250
|
browser: result.browser,
|
|
173
251
|
isLightpanda: true,
|
|
252
|
+
securityWarning: result.securityWarning,
|
|
174
253
|
};
|
|
175
254
|
}
|
|
176
255
|
// Log fallback reason if verbose
|
|
@@ -204,6 +283,7 @@ export async function getLightpandaStatus() {
|
|
|
204
283
|
const configured = isLightpandaConfigured();
|
|
205
284
|
const endpoint = buildLightpandaUrl(config);
|
|
206
285
|
const isCloud = endpoint.includes("cloud.lightpanda.io");
|
|
286
|
+
const securityWarning = isCloud ? getCloudSecurityWarning() : undefined;
|
|
207
287
|
if (!configured) {
|
|
208
288
|
return {
|
|
209
289
|
configured: false,
|
|
@@ -221,6 +301,7 @@ export async function getLightpandaStatus() {
|
|
|
221
301
|
available: true,
|
|
222
302
|
endpoint,
|
|
223
303
|
isCloud,
|
|
304
|
+
securityWarning,
|
|
224
305
|
};
|
|
225
306
|
}
|
|
226
307
|
return {
|
|
@@ -229,10 +310,11 @@ export async function getLightpandaStatus() {
|
|
|
229
310
|
endpoint,
|
|
230
311
|
isCloud,
|
|
231
312
|
error: result.error,
|
|
313
|
+
securityWarning,
|
|
232
314
|
};
|
|
233
315
|
}
|
|
234
316
|
/**
|
|
235
|
-
* Lightpanda setup instructions
|
|
317
|
+
* Lightpanda setup instructions with security warnings
|
|
236
318
|
*/
|
|
237
319
|
export const LIGHTPANDA_SETUP_GUIDE = `
|
|
238
320
|
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
@@ -242,52 +324,93 @@ export const LIGHTPANDA_SETUP_GUIDE = `
|
|
|
242
324
|
Lightpanda is 11x faster and uses 9x less memory than Chrome headless.
|
|
243
325
|
It's ideal for AI agents, web scraping, and automated testing.
|
|
244
326
|
|
|
245
|
-
━━━
|
|
327
|
+
━━━ ⚠️ SECURITY NOTICE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
328
|
+
|
|
329
|
+
Lightpanda is BETA software. Before using, understand:
|
|
246
330
|
|
|
247
|
-
|
|
331
|
+
🔴 NO SECURITY AUDIT - No formal security review or SECURITY.md
|
|
332
|
+
🔴 BETA STATUS - Crashes and bugs are expected
|
|
333
|
+
🔴 CLOUD EXPOSURE - Cloud mode routes traffic through lightpanda.io
|
|
334
|
+
🔴 OPT-IN ONLY - Requires explicit --lightpanda flag
|
|
335
|
+
|
|
336
|
+
NEVER use Lightpanda for:
|
|
337
|
+
✗ Authentication or login flows
|
|
338
|
+
✗ Credential or password handling
|
|
339
|
+
✗ Payment or checkout processes
|
|
340
|
+
✗ Any sensitive data operations
|
|
341
|
+
|
|
342
|
+
━━━ Option 1: Local Installation (Recommended) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
343
|
+
|
|
344
|
+
Docker (isolates Lightpanda from your system):
|
|
248
345
|
docker run -d --name lightpanda -p 9222:9222 lightpanda/browser:nightly
|
|
249
346
|
|
|
250
347
|
Binary (Linux/macOS):
|
|
251
|
-
curl -LO https://github.com/
|
|
348
|
+
curl -LO https://github.com/lightpanda-io/browser/releases/latest/download/lightpanda
|
|
252
349
|
chmod +x lightpanda
|
|
253
350
|
./lightpanda serve --host 127.0.0.1 --port 9222
|
|
254
351
|
|
|
255
352
|
Then set environment variable:
|
|
256
353
|
export LIGHTPANDA_ENDPOINT=ws://127.0.0.1:9222
|
|
257
354
|
|
|
258
|
-
━━━ Option 2: Lightpanda Cloud
|
|
355
|
+
━━━ Option 2: Lightpanda Cloud (⚠️ Third-Party Data Exposure) ━━━━━━━━━━━━━━━━
|
|
356
|
+
|
|
357
|
+
WARNING: Cloud mode sends ALL browser traffic through lightpanda.io servers.
|
|
358
|
+
They can see: URLs, page content, cookies, form submissions.
|
|
359
|
+
|
|
360
|
+
Only use for PUBLIC content you don't mind sharing.
|
|
259
361
|
|
|
260
362
|
1. Sign up at https://lightpanda.io/
|
|
261
363
|
2. Get your API token from the dashboard
|
|
262
364
|
3. Set environment variable:
|
|
263
365
|
export LIGHTPANDA_TOKEN=your-api-token
|
|
264
366
|
|
|
265
|
-
━━━
|
|
367
|
+
━━━ Usage (OPT-IN REQUIRED) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
368
|
+
|
|
369
|
+
Lightpanda is NOT used automatically. You must explicitly opt-in:
|
|
266
370
|
|
|
267
|
-
Check status
|
|
371
|
+
# Check status
|
|
268
372
|
npx cbrowser lightpanda-status
|
|
269
373
|
|
|
270
|
-
|
|
374
|
+
# Take screenshot with Lightpanda (--lightpanda flag required)
|
|
271
375
|
npx cbrowser screenshot https://example.com --lightpanda
|
|
272
376
|
|
|
377
|
+
# Run audit with Lightpanda
|
|
378
|
+
npx cbrowser agent-ready-audit https://example.com --lightpanda
|
|
379
|
+
|
|
273
380
|
━━━ When to Use Lightpanda ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
274
381
|
|
|
275
|
-
✅
|
|
276
|
-
• Agent-ready audits
|
|
277
|
-
• Empathy audits
|
|
278
|
-
• Web scraping
|
|
279
|
-
•
|
|
280
|
-
•
|
|
382
|
+
✅ Good for (public, non-sensitive):
|
|
383
|
+
• Agent-ready audits on public sites
|
|
384
|
+
• Empathy audits (accessibility testing)
|
|
385
|
+
• Web scraping public content
|
|
386
|
+
• Performance benchmarking
|
|
387
|
+
• Batch operations on public pages
|
|
281
388
|
|
|
282
|
-
❌
|
|
283
|
-
• Visual regression testing (
|
|
284
|
-
• Cross-browser testing (
|
|
285
|
-
•
|
|
389
|
+
❌ Never use for:
|
|
390
|
+
• Visual regression testing (different rendering)
|
|
391
|
+
• Cross-browser testing (Chromium only)
|
|
392
|
+
• Authentication flows
|
|
393
|
+
• Any operation with credentials
|
|
394
|
+
• Payment or checkout testing
|
|
286
395
|
|
|
287
396
|
━━━ More Information ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
288
397
|
|
|
398
|
+
GitHub: https://github.com/lightpanda-io/browser
|
|
289
399
|
Documentation: https://lightpanda.io/docs
|
|
290
|
-
GitHub: https://github.com/nicecoder/lightpanda
|
|
291
400
|
CBrowser Integration: https://cbrowser.ai/docs/lightpanda
|
|
292
401
|
`;
|
|
402
|
+
/**
|
|
403
|
+
* Security warning constant for display
|
|
404
|
+
*/
|
|
405
|
+
export const LIGHTPANDA_SECURITY_WARNING = `
|
|
406
|
+
⚠️ LIGHTPANDA SECURITY NOTICE
|
|
407
|
+
|
|
408
|
+
Lightpanda is beta software with no formal security audit.
|
|
409
|
+
• No SECURITY.md or vulnerability disclosure process
|
|
410
|
+
• No third-party code audit documented
|
|
411
|
+
• Cloud mode exposes traffic to lightpanda.io servers
|
|
412
|
+
|
|
413
|
+
Use only for public, non-sensitive operations.
|
|
414
|
+
Never use for authentication, credentials, or payments.
|
|
415
|
+
`.trim();
|
|
293
416
|
//# sourceMappingURL=lightpanda.js.map
|
package/dist/lightpanda.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightpanda.js","sourceRoot":"","sources":["../src/lightpanda.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"lightpanda.js","sourceRoot":"","sources":["../src/lightpanda.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AA2CpD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,qCAAqC,CAAC;AAE/E;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;QACzC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;QACnC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,OAAO,EAAE,EAAE,CAAC,IAAI,KAAK;QACzE,aAAa,EAAE,KAAK,EAAE,yBAAyB;KAChD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;IACrC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAkB;IACrD,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IAC7B,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IACtC,MAAM,iBAAiB,GAAyB;QAC9C,MAAM;QACN,OAAO;QACP,YAAY;QACZ,SAAS;QACT,UAAU;QACV,UAAU;QACV,KAAK;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AAC;IACzD,MAAM,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAExE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,yBAAyB;YACnC,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;IAED,iBAAiB;IACjB,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAEjD,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACrC,MAAM,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7B,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,IAAI;YACf,QAAQ;YACR,OAAO;YACP,eAAe;SAChB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,QAAQ;QACR,OAAO;QACP,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,eAAe;KAChB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFrC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;CAU1C,CAAC,IAAI,EAAE,CAAC"}
|
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":";AACA;;;;GAIG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA0nIpE;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,SAAS,CAAC,CAE1D;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAWvE;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpD"}
|
package/dist/mcp-server.js
CHANGED
|
@@ -2938,8 +2938,9 @@ This ensures personas are grounded in research, not stereotypes.
|
|
|
2938
2938
|
// =========================================================================
|
|
2939
2939
|
// Diagnostics Tools
|
|
2940
2940
|
// =========================================================================
|
|
2941
|
-
server.tool("status", "Get CBrowser environment status and diagnostics including data directories, installed browsers, configuration,
|
|
2942
|
-
|
|
2941
|
+
server.tool("status", "Get CBrowser environment status and diagnostics including data directories, installed browsers, configuration, self-healing cache statistics, and MCP tool count", {}, async () => {
|
|
2942
|
+
// v18.22.0: Include tool count for self-diagnosis of tool discrepancies
|
|
2943
|
+
const info = await getStatusInfo(VERSION, collectedTools.length);
|
|
2943
2944
|
return {
|
|
2944
2945
|
content: [
|
|
2945
2946
|
{
|