Skip to content

Conversation

derekmeegan
Copy link
Contributor

No description provided.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR adds two new configuration options to the Browserbase MCP server: --experimental and --keepAlive CLI flags. The changes are implemented comprehensively across the entire configuration system.

The --experimental flag enables experimental features in the Stagehand browser automation library, allowing users to opt into beta functionality that may provide additional capabilities but could be less stable. The --keepAlive flag controls whether Browserbase sessions should remain active after operations complete, which is useful for debugging, manual inspection, or continuing work in the same session.

The implementation follows a clean architecture pattern where both options flow through the complete configuration pipeline:

  1. CLI Layer: Added to the commander.js configuration in src/program.ts as optional boolean flags
  2. Type Definitions: Added to CLIOptions type in src/config.ts and Config interface in config.d.ts
  3. Config Resolution: Mapped from CLI options to the final Config object in src/config.ts
  4. Usage: Applied in src/stagehandStore.ts where they're passed to the Stagehand constructor and Browserbase session creation parameters
  5. Documentation: The experimental flag is documented in the README.md

The PR also updates the @browserbasehq/stagehand dependency from version 2.4.0 to 2.4.3, which likely includes support for the experimental features being exposed. Both new options use nullish coalescing operators (??) with sensible defaults (false for both) to maintain backward compatibility.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk
  • Score reflects well-structured implementation following existing patterns with comprehensive integration across all configuration layers
  • No files require special attention

7 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@Kylejeong2 Kylejeong2 merged commit ed0d98e into main Aug 20, 2025
1 check passed
@derekmeegan derekmeegan deleted the derek/add_exp_flag branch August 20, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants