cbrowser 18.8.1 → 18.9.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/browser.d.ts +26 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +39 -0
- package/dist/browser.js.map +1 -1
- package/dist/cli.js +32 -0
- package/dist/cli.js.map +1 -1
- package/dist/cognitive/index.d.ts +10 -0
- package/dist/cognitive/index.d.ts.map +1 -1
- package/dist/cognitive/index.js +19 -1
- package/dist/cognitive/index.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/mcp-tools/base/cognitive-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/cognitive-tools.js +25 -1
- package/dist/mcp-tools/base/cognitive-tools.js.map +1 -1
- package/dist/personas.d.ts.map +1 -1
- package/dist/personas.js +12 -0
- package/dist/personas.js.map +1 -1
- package/dist/types.d.ts +19 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -95,6 +95,9 @@ COGNITIVE JOURNEY (API-powered, realistic user simulation)
|
|
|
95
95
|
--no-vision Disable vision mode (text-only, less accurate but faster)
|
|
96
96
|
--output <file> Save JSON report to file
|
|
97
97
|
--html Generate HTML report
|
|
98
|
+
--timezone <tz> Override persona timezone (e.g., "America/New_York", "Europe/London")
|
|
99
|
+
--locale <loc> Override persona locale (e.g., "en-US", "de-DE")
|
|
100
|
+
--geolocation <lat,lng> Override persona geolocation (e.g., "40.7128,-74.0060")
|
|
98
101
|
|
|
99
102
|
Why use this over 'explore'?
|
|
100
103
|
• Tracks cognitive state: patience, frustration, confusion
|
|
@@ -4412,6 +4415,24 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
4412
4415
|
const verbose = options.verbose === true;
|
|
4413
4416
|
const headless = options.headless === true;
|
|
4414
4417
|
const vision = options["no-vision"] !== true; // Vision ON by default (v17.1.0)
|
|
4418
|
+
// Parse location options
|
|
4419
|
+
let locationOverride;
|
|
4420
|
+
if (options.timezone || options.locale || options.geolocation) {
|
|
4421
|
+
locationOverride = {};
|
|
4422
|
+
if (options.timezone)
|
|
4423
|
+
locationOverride.timezone = options.timezone;
|
|
4424
|
+
if (options.locale)
|
|
4425
|
+
locationOverride.locale = options.locale;
|
|
4426
|
+
if (options.geolocation) {
|
|
4427
|
+
const [lat, lng] = options.geolocation.split(",").map(s => parseFloat(s.trim()));
|
|
4428
|
+
if (!isNaN(lat) && !isNaN(lng)) {
|
|
4429
|
+
locationOverride.geolocation = { latitude: lat, longitude: lng };
|
|
4430
|
+
}
|
|
4431
|
+
else {
|
|
4432
|
+
console.warn(" ⚠️ Invalid geolocation format. Use: --geolocation lat,lng");
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4435
|
+
}
|
|
4415
4436
|
// Read custom traits from environment variable (for Enterprise autonomous mode)
|
|
4416
4437
|
let customTraits;
|
|
4417
4438
|
const envTraits = process.env.CBROWSER_CUSTOM_TRAITS;
|
|
@@ -4435,6 +4456,16 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
4435
4456
|
console.log(` Vision: disabled (text-only mode)`);
|
|
4436
4457
|
if (customTraits)
|
|
4437
4458
|
console.log(` Traits: custom profile (${Object.keys(customTraits).length} traits)`);
|
|
4459
|
+
if (locationOverride) {
|
|
4460
|
+
const locParts = [];
|
|
4461
|
+
if (locationOverride.timezone)
|
|
4462
|
+
locParts.push(`tz=${locationOverride.timezone}`);
|
|
4463
|
+
if (locationOverride.locale)
|
|
4464
|
+
locParts.push(`locale=${locationOverride.locale}`);
|
|
4465
|
+
if (locationOverride.geolocation)
|
|
4466
|
+
locParts.push(`geo=${locationOverride.geolocation.latitude},${locationOverride.geolocation.longitude}`);
|
|
4467
|
+
console.log(` Location: ${locParts.join(", ")}`);
|
|
4468
|
+
}
|
|
4438
4469
|
console.log("");
|
|
4439
4470
|
try {
|
|
4440
4471
|
const result = await runCognitiveJourney({
|
|
@@ -4447,6 +4478,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
4447
4478
|
headless,
|
|
4448
4479
|
vision,
|
|
4449
4480
|
customTraits, // Pass custom traits from env var
|
|
4481
|
+
location: locationOverride, // Pass location override
|
|
4450
4482
|
onStep: verbose ? undefined : (step) => {
|
|
4451
4483
|
process.stdout.write(`\r Step ${step.step}: ${step.phase} (${step.state.currentMood})`);
|
|
4452
4484
|
},
|