Skip to content

Commit c08b4fb

Browse files
edenreichclaude
andauthored
feat: Add headless configuration (#37)
## Summary This PR adds headless browser configuration support and updates project dependencies to their latest versions. ### Key Changes **Browser Configuration:** - ✅ Add `BROWSER_HEADLESS` environment variable support (default: `true`) - ✅ Fix hardcoded headless value in `NewBrowserConfigFromConfig` function (internal/playwright/playwright.go:92) - ✅ Allow users to disable headless mode for debugging and development by setting `BROWSER_HEADLESS=false` - ✅ Update README with `BROWSER_HEADLESS` configuration documentation **Dependency Updates:** - ✅ Upgrade ADL CLI from v0.23.7 to v0.23.8 in generated workflow and configuration files - ✅ Upgrade ADK dependency from v0.15.1 to v0.15.2 in go.mod - ✅ Upgrade Claude Code from 2.0.11 to 2.0.15 in Flox manifest **Refactoring:** - ✅ Streamline artifact server creation in main.go ### Configuration Usage Users can now control headless mode via environment variable: ```bash # Run in headless mode (default) BROWSER_HEADLESS=true go run . # Run with visible browser for debugging BROWSER_HEADLESS=false go run . ``` ### Testing - ✅ All unit tests pass - ✅ Linter checks pass (0 issues) - ✅ Headless configuration properly reads from environment ### Files Changed - `agent.yaml` - Added headless configuration - `config/config.go` - Added Headless field to BrowserConfig struct - `internal/playwright/playwright.go` - Fixed hardcoded headless value to use config - `README.md` - Documented BROWSER_HEADLESS variable - `main.go` - Refactored artifact server creation - `.flox/env/manifest.toml` - Updated Claude Code version - `.github/workflows/ci.yml` - Updated ADL CLI version - `go.mod` / `go.sum` - Updated ADK dependency --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Eden Reich <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent 7d0a388 commit c08b4fb

File tree

15 files changed

+294
-275
lines changed

15 files changed

+294
-275
lines changed

.flox/env/manifest.lock

Lines changed: 273 additions & 253 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.flox/env/manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ docker.pkg-group = "common"
2222

2323
claude-code.pkg-path = "claude-code"
2424
claude-code.pkg-group = "common"
25-
claude-code.version = "2.0.11"
25+
claude-code.version = "2.0.15"
2626

2727
[hook]
2828
on-activate = '''

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.releaserc.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ browser-agent is an A2A (Agent-to-Agent) server implementing the [A2A Protocol](
1010

1111
### ADL-Generated Structure
1212

13-
The codebase is generated using ADL CLI 0.23.7 and follows a strict generation pattern:
13+
The codebase is generated using ADL CLI 0.23.8 and follows a strict generation pattern:
1414
- **Generated Files**: Marked with `DO NOT EDIT` headers - manual changes will be overwritten
1515
- **Configuration Source**: `agent.yaml` - defines agent capabilities, skills, and metadata
1616
- **Server Implementation**: Built on the ADK (Agent Development Kit) framework from `github.com/inference-gateway/adk`
@@ -117,7 +117,7 @@ Activate with: `flox activate` (if Flox is installed)
117117

118118
- **Generated Files**: Never manually edit files with "DO NOT EDIT" headers
119119
- **Configuration Changes**: Always modify `agent.yaml` and regenerate
120-
- **ADL Version**: Ensure ADL CLI 0.23.7 or compatible version for regeneration
120+
- **ADL Version**: Ensure ADL CLI 0.23.8 or compatible version for regeneration
121121
- **Port Configuration**: Default 8080, configurable via `A2A_PORT` or `A2A_SERVER_PORT`
122122

123123
## Debugging Tips

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The following custom configuration variables are available:
6868
| **Browser** | `BROWSER_HEADER_CONNECTION` | Header_connection configuration | `keep-alive` |
6969
| **Browser** | `BROWSER_HEADER_DNT` | Header_dnt configuration | `1` |
7070
| **Browser** | `BROWSER_HEADER_UPGRADE_INSECURE_REQUESTS` | Header_upgrade_insecure_requests configuration | `1` |
71+
| **Browser** | `BROWSER_HEADLESS` | Headless configuration | `true` |
7172
| **Browser** | `BROWSER_USER_AGENT` | User_agent configuration | `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36` |
7273
| **Browser** | `BROWSER_VIEWPORT_HEIGHT` | Viewport_height configuration | `1080` |
7374
| **Browser** | `BROWSER_VIEWPORT_WIDTH` | Viewport_width configuration | `1920` |

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

agent.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ spec:
1111
stateTransitionHistory: false
1212
config:
1313
browser:
14+
headless: true
1415
user_agent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
1516
viewport_width: 1920
1617
viewport_height: 1080

config/config.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)