cbrowser 16.18.0 → 17.1.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/cli.js CHANGED
@@ -97,7 +97,7 @@ COGNITIVE JOURNEY (API-powered, realistic user simulation)
97
97
  --max-steps <n> Maximum steps before timeout (default: 50)
98
98
  --max-time <s> Maximum time in seconds (default: 120)
99
99
  --verbose Show step-by-step narration and internal monologue
100
- --vision Enable vision mode - send screenshots to Claude (more accurate)
100
+ --no-vision Disable vision mode (text-only, less accurate but faster)
101
101
  --output <file> Save JSON report to file
102
102
  --html Generate HTML report
103
103
 
@@ -4385,14 +4385,30 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
4385
4385
  const maxTime = options["max-time"] ? parseInt(options["max-time"]) : 120;
4386
4386
  const verbose = options.verbose === true;
4387
4387
  const headless = options.headless === true;
4388
- const vision = options.vision === true;
4388
+ const vision = options["no-vision"] !== true; // Vision ON by default (v17.1.0)
4389
+ // Read custom traits from environment variable (for Enterprise autonomous mode)
4390
+ let customTraits;
4391
+ const envTraits = process.env.CBROWSER_CUSTOM_TRAITS;
4392
+ if (envTraits) {
4393
+ try {
4394
+ customTraits = JSON.parse(envTraits);
4395
+ if (verbose) {
4396
+ console.log(` Custom traits: ${Object.keys(customTraits || {}).length} trait overrides from env`);
4397
+ }
4398
+ }
4399
+ catch {
4400
+ console.warn(` ⚠️ Could not parse CBROWSER_CUSTOM_TRAITS env var`);
4401
+ }
4402
+ }
4389
4403
  console.log(`\n🧠 COGNITIVE JOURNEY`);
4390
4404
  console.log(` Persona: ${personaName}`);
4391
4405
  console.log(` Goal: "${goal}"`);
4392
4406
  console.log(` URL: ${startUrl}`);
4393
4407
  console.log(` Max steps: ${maxSteps} | Max time: ${maxTime}s`);
4394
- if (vision)
4395
- console.log(` Vision: enabled (screenshots sent to Claude)`);
4408
+ if (!vision)
4409
+ console.log(` Vision: disabled (text-only mode)`);
4410
+ if (customTraits)
4411
+ console.log(` Traits: custom profile (${Object.keys(customTraits).length} traits)`);
4396
4412
  console.log("");
4397
4413
  try {
4398
4414
  const result = await runCognitiveJourney({
@@ -4404,6 +4420,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
4404
4420
  verbose,
4405
4421
  headless,
4406
4422
  vision,
4423
+ customTraits, // Pass custom traits from env var
4407
4424
  onStep: verbose ? undefined : (step) => {
4408
4425
  process.stdout.write(`\r Step ${step.step}: ${step.phase} (${step.state.currentMood})`);
4409
4426
  },