Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ coverage/
*.tsbuildinfo

# Test generated files
/test/fixtures/generated/
/test/fixtures/generated/

# Playwright outputs (Chromium extension E2E)
chromium-extension/test-results/
chromium-extension/playwright-report/
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ Join us and help shape the future of AI-powered browsing:

We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to get started.

## SOCA Official Operations Guides

- Markdown operations guide: `../../../RESSOURCES/guides/SOCA_HOLOBIONT_OS_OPENBROWSER_PROMPTBUDDY_OFFICIAL_GUIDE.md`
- HOLOS HTML guide: `../../../RESSOURCES/guides/SOCA_HOLOBIONT_OS_HOLOS_OPENBROWSER_GUIDE.html`
- Official guides index: `../../../RESSOURCES/guides/SOCA_OFFICIAL_GUIDES_INDEX.html`
- Bridge Prompt Buddy notes: `./bridge/PROMPTBUDDY.md`

## License

OpenBrowser is open source under MIT licence
24 changes: 24 additions & 0 deletions app_builder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SOCA OpenBrowser App Builder (v1)

This module implements a SOCA App Builder lane designed for **Best-of-N** candidate generation across multiple web builders (Google AI Studio Build, Lovable, Antigravity) with:

- Deterministic, replayable **Action DSL** runs
- **Evidence-first** artifacts (screenshots, DOM snapshots, actions log, downloads, sha256 manifest)
- **Fail-closed** behavior (missing artifacts = FAIL)
- **HIL-gated** steps (explicit pauses for login/OAuth/export/download when required)

Key files:

- Blueprint (SSOT input contract):
- `SOCA_APP_BUILDER_BLUEPRINT.v1.json`
- Action specs (per builder):
- `actions/google_ai_studio_build.actions.v1.json`
- `actions/lovable.actions.v1.json`
- `actions/antigravity.actions.v1.json`
- Runner (Action DSL engine + evidence):
- `run_action_spec.ts`

Notes:

- The provided action specs are **templates** and may require selector tuning as vendor UIs evolve.
- This lane is designed to be extended with additional builders by adding new `actions/*.actions.v1.json` and adapter logic.
133 changes: 133 additions & 0 deletions app_builder/SOCA_APP_BUILDER_BLUEPRINT.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"schema_version": "1.0",
"kind": "SOCA_APP_BUILDER_BLUEPRINT",
"id": "soca_app_builder_v1",
"policy": {
"lane": "L1_ASSISTED",
"network": "ALLOW_BUILDER_UI_ONLY",
"ssot_write": false,
"hil_required_for": [
"login_or_oauth",
"grant_browser_permissions",
"connect_github",
"download_or_export_code",
"run_external_commands"
]
},
"inputs": {
"app_name": "NT2L",
"app_codename": "nt2l",
"primary_blueprint_files": [
"NT2L_APP_BLUEPRINT.json",
"NT2L_WORKFLOW_SCHEMA.json"
],
"prompt_pack": {
"global_system_instructions": "SYSTEM_INSTRUCTIONS.txt",
"builder_first_message": "FIRST_MESSAGE.txt",
"post_export_fixup_prompt": "FIXUP_PROMPT.txt"
}
},
"builders": [
{
"id": "google_ai_studio_build",
"label": "Google AI Studio Build",
"type": "web_builder",
"url": "https://aistudio.google.com/apps",
"allowed_domains": ["aistudio.google.com", "accounts.google.com"],
"export_methods": ["download_zip", "github_sync"],
"adapter": {
"action_spec_template": "actions/google_ai_studio_build.actions.v1.json",
"ui_contract": {
"system_instructions_panel": "advanced_settings",
"build_button_text": "Build",
"download_button_text": "Download"
}
}
},
{
"id": "lovable",
"label": "Lovable",
"type": "web_builder",
"url": "https://lovable.dev",
"allowed_domains": ["lovable.dev", "github.com"],
"export_methods": ["github_sync", "download_zip"],
"adapter": {
"action_spec_template": "actions/lovable.actions.v1.json",
"ui_contract": {
"new_project": "New project",
"export_to_github": "Connect to GitHub",
"download_zip": "Download"
}
}
},
{
"id": "antigravity",
"label": "Antigravity",
"type": "agent_ide",
"url": "https://antigravity.google/",
"allowed_domains": ["antigravity.google"],
"export_methods": ["github_sync", "export_zip"],
"adapter": {
"mode": "workspace_isolated",
"artifacts_required": [
"task_list",
"implementation_plan",
"screenshots",
"recordings"
],
"danger_mode": "OFF"
}
}
],
"best_of_n": {
"n_per_builder": 3,
"variant_strategy": {
"prompt_variants": ["baseline", "strict_nextjs_only", "a11y_extreme"],
"temperature": [0.1, 0.2, 0.3]
}
},
"post_export": {
"normalize": {
"target_stack": "nextjs_app_router_ts",
"if_builder_outputs_vite_react": "run_fixup_prompt_then_codex_patchset"
},
"quality_gates": [
"dependency_install",
"lint",
"typecheck",
"unit_tests",
"a11y_smoke",
"security_audit"
],
"scoring": {
"weights": {
"build_success": 40,
"tests_pass": 20,
"a11y": 15,
"security": 15,
"maintainability": 10
},
"min_requirements": {
"build_success": true,
"no_critical_vulns": true,
"a11y_smoke_pass": true
}
}
},
"evidence": {
"bundle_format": "SOCA_EVIDENCE_BUNDLE_V1",
"required_artifacts": [
"rendered_prompts",
"actions_log_jsonl",
"dom_snapshots",
"screenshots",
"downloaded_artifacts",
"sha256_manifest"
]
},
"outputs": {
"runs_dir": "runs/app_builder",
"emit_candidate_bundles": true,
"emit_best_candidate_pointer": true
}
}
32 changes: 32 additions & 0 deletions app_builder/actions/antigravity.actions.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"schema_version": "1.0",
"builder_id": "antigravity",
"steps": [
{ "op": "open_url", "url": "https://antigravity.google/" },
{
"op": "hil_pause",
"reason": "User must be logged in to Antigravity and open an isolated workspace before continuing."
},

{ "op": "wait_for_selector", "selector": "body", "timeout_ms": 60000 },
{ "op": "screenshot", "label": "antigravity_loaded" },

{
"op": "hil_pause",
"reason": "Run the Antigravity task to generate the candidate. Ensure required artifacts are produced (task list, implementation plan, screenshots/recordings)."
},
{ "op": "screenshot", "label": "antigravity_after_generation" },

{
"op": "hil_pause",
"reason": "HIL required to export code (ZIP and/or GitHub). Trigger an export that downloads a ZIP to continue."
},
{
"op": "download_click_and_capture",
"label": "antigravity_zip_export",
"selector": "button:has-text('Export'), button:has-text('Download'), a:has-text('Download')"
},

{ "op": "read_dom_snapshot", "label": "final_dom" }
]
}
52 changes: 52 additions & 0 deletions app_builder/actions/google_ai_studio_build.actions.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"schema_version": "1.0",
"builder_id": "google_ai_studio_build",
"steps": [
{ "op": "open_url", "url": "https://aistudio.google.com/apps" },
{
"op": "hil_pause",
"reason": "User must be logged in to Google if not already."
},

{ "op": "wait_for_text", "text": "Build", "timeout_ms": 30000 },
{ "op": "screenshot", "label": "aistudio_apps_loaded" },

{
"op": "click",
"selector": "[aria-label*='Advanced settings'], [aria-label*='Settings'], button[title*='Settings']"
},
{
"op": "wait_for_text",
"text": "System instructions",
"timeout_ms": 30000
},

{
"op": "paste_large_text",
"target": "system_instructions",
"from_file": "SYSTEM_INSTRUCTIONS.txt"
},
{
"op": "upload_files",
"files": ["NT2L_APP_BLUEPRINT.json", "NT2L_WORKFLOW_SCHEMA.json"]
},

{
"op": "paste_large_text",
"target": "main_prompt",
"from_file": "FIRST_MESSAGE.txt"
},
{ "op": "click", "selector": "button:has-text('Build')" },

{ "op": "wait_for_text", "text": "Checkpoint", "timeout_ms": 240000 },
{ "op": "screenshot", "label": "build_complete" },

{
"op": "click",
"selector": "button[title*='Download'], button:has-text('Download')"
},
{ "op": "download_click_and_capture", "label": "aistudio_zip_export" },

{ "op": "read_dom_snapshot", "label": "final_dom" }
]
}
58 changes: 58 additions & 0 deletions app_builder/actions/lovable.actions.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"schema_version": "1.0",
"builder_id": "lovable",
"steps": [
{ "op": "open_url", "url": "https://lovable.dev" },
{
"op": "hil_pause",
"reason": "User must be logged in to Lovable if not already."
},

{ "op": "wait_for_text", "text": "New project", "timeout_ms": 60000 },
{ "op": "screenshot", "label": "lovable_loaded" },

{ "op": "click", "selector": "text=New project" },
{
"op": "wait_for_selector",
"selector": "textarea, [contenteditable='true']",
"timeout_ms": 60000
},

{
"op": "paste_large_text",
"target": "main_prompt",
"from_file": "FIRST_MESSAGE.txt"
},
{
"op": "click",
"selector": "button:has-text('Create'), button:has-text('Generate'), button:has-text('Build')"
},

{
"op": "wait_for_text",
"text": "Connect to GitHub",
"timeout_ms": 240000
},
{ "op": "screenshot", "label": "lovable_ready_to_export" },

{
"op": "hil_pause",
"reason": "HIL required to connect GitHub and/or authorize export."
},

{ "op": "click", "selector": "text=Connect to GitHub" },
{
"op": "hil_pause",
"reason": "Complete GitHub OAuth/connection in the browser, then continue."
},

{ "op": "wait_for_text", "text": "Download", "timeout_ms": 240000 },
{
"op": "download_click_and_capture",
"label": "lovable_zip_export",
"selector": "button:has-text('Download'), a:has-text('Download')"
},

{ "op": "read_dom_snapshot", "label": "final_dom" }
]
}
Loading
Loading