mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-18 11:06:19 +00:00
db1d901adf94309dedcbbeee4ff0ce2ed39c2e2f
BrowserOS Agent
⚠️ Note: This is only the submodule for the browserOS agent.
Main repository: https://github.com/browseros-ai/BrowserOS
Development
Debugging with VS Code
The project includes comprehensive VS Code debugging support for Chrome extensions:
🚀 One-Click Debugging
- Set breakpoints in any file under
src/(background scripts, options page, etc.) - Press F5 or select "🚀 Debug Extension (One-Click)" from the debug dropdown
Debugging Different Contexts
After launching the main debug configuration, you can attach to specific contexts:
- Background Script: Use "Debug Background Script (Service Worker)"
- Options Pages: Use "Debug Extension Pages (Options)"
- Content Scripts: Use "Debug Content Scripts (Web Pages)"
Setup Requirements
- Make sure Chrome is installed at
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome - The debug profile will be created at
.chrome-debug-profile/(ignored by git) - Port 9222 will be used for remote debugging
Building
# Production build
npm run build
# Development build (with source maps)
npm run build:dev
# Development build with file watching
npm run build:watch
Project Structure
src/
├── background/ # Service worker (background script)
├── options/ # Options page (main UI)
├── content/ # Content scripts
├── lib/ # Shared libraries
│ ├── browser/ # Browser automation (puppeteer-core)
│ ├── agent/ # LLM agents
│ ├── tools/ # Browser automation tools
│ └── utilities/ # Utilities (LogUtility, etc.)
└── config.ts # Global configuration (DEV_MODE, etc.)
Configuration
Key settings in src/config.ts:
export const config = {
DEV_MODE: true, // Shows logs in options page
VERSION: '0.1.0',
LOG_LEVEL: 'info'
}
Usage
- Install Extension: Load
dist/directory in Chrome extensions - Open Control Panel: Click extension icon to open options page
- View Logs: Development logs appear in real-time (when DEV_MODE: true)
Architecture
- Port Messaging: Uses
OPTIONS_TO_BACKGROUNDfor UI ↔ Background communication - Centralized Logging:
LogUtilityroutes logs to options page when DEV_MODE enabled
License
MIT
Languages
TypeScript
65.6%
C++
24%
Go
6.5%
C
1.5%
Objective-C++
1%
Other
1.3%