Skip to content

Conversation

@mulyoved
Copy link

Enable connecting to a remote Chrome/Edge browser via CDP for browser automation mode. This allows running Oracle on headless servers while using a browser with GUI on another machine (e.g., Windows desktop).

New CLI flag: --remote-chrome host:port

Features:

  • Connect to remote Chrome via CDP instead of launching local browser
  • Skip cookie sync (uses existing browser session)
  • Automatic model selection and prompt submission
  • Full compatibility with existing browser mode features

Example usage:
oracle --engine browser --remote-chrome 192.168.1.10:9222 --prompt "Hello"

🤖 Generated with Claude Code

Enable connecting to a remote Chrome/Edge browser via CDP for browser
automation mode. This allows running Oracle on headless servers while
using a browser with GUI on another machine (e.g., Windows desktop).

New CLI flag: --remote-chrome <host:port>

Features:
- Connect to remote Chrome via CDP instead of launching local browser
- Skip cookie sync (uses existing browser session)
- Automatic model selection and prompt submission
- Full compatibility with existing browser mode features

Example usage:
  oracle --engine browser --remote-chrome 192.168.1.10:9222 --prompt "Hello"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@steipete
Copy link
Owner

Thanks! Interesting feature. How are file attachments handled?

@steipete steipete added the question Further information is requested label Nov 17, 2025
mulyoved and others added 3 commits November 18, 2025 05:04
Resolve P1 issue where remote Chrome couldn't access local files.

Solution: Transfer files via CDP using DataTransfer API
- Read file content from CLI host filesystem
- Base64 encode and inject into remote browser's DOM
- Create File object via JavaScript DataTransfer API
- Trigger change event on file input

This enables full file attachment support in remote mode, allowing
users to send local files from headless servers to ChatGPT via
a remote browser on another machine.

Fixes steipete#8 (P1 Badge: Remote mode cannot upload local files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…e transfer

- Add error handling for Runtime.evaluate exceptions with exceptionDetails
- Remove unused waitForAttachmentRecognition function (dead code)
- Add 20MB file size limit to prevent CDP protocol issues
- Expand MIME type coverage (CSV, Office docs, WebP, archives)
- Dispatch both input and change events for better compatibility
- Add browser API validation (File, Blob, DataTransfer, atob)
- Add stricter file input element validation (instanceof, type check)

All improvements suggested by GPT-5 Pro code review implemented and tested.
Multi-file upload verified with 3 files (test-file.txt, remoteFileTransfer.ts, package.json).
Based on GPT-5 Pro code review feedback, address critical robustness issues:

- Port validation: Add Number.isFinite() check and enforce valid range (1-65535)
  to prevent NaN and out-of-range port errors in browserConfig.ts

- CDP error handling: Validate evalResult.result structure before accessing
  to prevent crashes from malformed CDP protocol responses in remoteFileTransfer.ts

- User warnings: Alert users when local-only browser flags are ignored in
  remote Chrome mode to prevent silent misconfiguration in index.ts

- Documentation: Update test script comments to reflect actual --remote-chrome
  flag syntax instead of deprecated split flags

All fixes reviewed and rated 'Good' or 'Excellent' by GPT-5 Pro.
steipete pushed a commit that referenced this pull request Nov 18, 2025
Resolve P1 issue where remote Chrome couldn't access local files.

Solution: Transfer files via CDP using DataTransfer API
- Read file content from CLI host filesystem
- Base64 encode and inject into remote browser's DOM
- Create File object via JavaScript DataTransfer API
- Trigger change event on file input

This enables full file attachment support in remote mode, allowing
users to send local files from headless servers to ChatGPT via
a remote browser on another machine.

Fixes #8 (P1 Badge: Remote mode cannot upload local files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
suits-at pushed a commit to suits-at/oracle that referenced this pull request Nov 18, 2025
Resolve P1 issue where remote Chrome couldn't access local files.

Solution: Transfer files via CDP using DataTransfer API
- Read file content from CLI host filesystem
- Base64 encode and inject into remote browser's DOM
- Create File object via JavaScript DataTransfer API
- Trigger change event on file input

This enables full file attachment support in remote mode, allowing
users to send local files from headless servers to ChatGPT via
a remote browser on another machine.

Fixes steipete#8 (P1 Badge: Remote mode cannot upload local files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
steipete pushed a commit that referenced this pull request Nov 19, 2025
Resolve P1 issue where remote Chrome couldn't access local files.

Solution: Transfer files via CDP using DataTransfer API
- Read file content from CLI host filesystem
- Base64 encode and inject into remote browser's DOM
- Create File object via JavaScript DataTransfer API
- Trigger change event on file input

This enables full file attachment support in remote mode, allowing
users to send local files from headless servers to ChatGPT via
a remote browser on another machine.

Fixes #8 (P1 Badge: Remote mode cannot upload local files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
steipete pushed a commit that referenced this pull request Nov 19, 2025
Resolve P1 issue where remote Chrome couldn't access local files.

Solution: Transfer files via CDP using DataTransfer API
- Read file content from CLI host filesystem
- Base64 encode and inject into remote browser's DOM
- Create File object via JavaScript DataTransfer API
- Trigger change event on file input

This enables full file attachment support in remote mode, allowing
users to send local files from headless servers to ChatGPT via
a remote browser on another machine.

Fixes #8 (P1 Badge: Remote mode cannot upload local files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants