Skip to content

refactor(bootstrap): consolidate ACP browser bootstrap into install.{sh,ps1}#27851

Merged
alt-glitch merged 3 commits into
mainfrom
sid/consolidate-bootstrap
May 18, 2026
Merged

refactor(bootstrap): consolidate ACP browser bootstrap into install.{sh,ps1}#27851
alt-glitch merged 3 commits into
mainfrom
sid/consolidate-bootstrap

Conversation

@alt-glitch

@alt-glitch alt-glitch commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Delete acp_adapter/bootstrap/ (687 lines of duplicated browser bootstrap)
  • _run_setup_browser() now routes through dep_ensure.ensure_dependency() instead of shelling to custom scripts
  • install.sh gains ensure_browser() with npm -g --prefix, macOS app-bundle detection, and per-distro hints
  • ensure_mode() and postinstall_mode() browser cases simplified to call ensure_browser()
  • configure_browser_env_from_system_browser() fixed for pip users (creates .env if missing)

Stacked on #27845 (sid/windows-bootstrap)

Tracking: #27826

Test plan

  • pytest tests/acp/test_entry.py tests/hermes_cli/test_dep_ensure.py -v — all 24 pass
  • Straggler grep for bootstrap_browser_tools: zero hits
  • E2E: Docker bare + Docker+Node + git-clone regression

@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change P2 Medium — degraded but workaround exists comp/acp Agent Communication Protocol adapter comp/cli CLI entry point, hermes_cli/, setup wizard labels May 18, 2026
@alt-glitch alt-glitch force-pushed the sid/windows-bootstrap branch from 5bb5a08 to 0b188dc Compare May 18, 2026 08:49
@alt-glitch alt-glitch force-pushed the sid/consolidate-bootstrap branch 3 times, most recently from 1169221 to 94c36fc Compare May 18, 2026 10:58
Base automatically changed from sid/windows-bootstrap to main May 18, 2026 11:04
@alt-glitch alt-glitch requested a review from a team May 18, 2026 11:04
…sh,ps1}

Delete 687 lines of duplicated browser bootstrap code from
acp_adapter/bootstrap/. All browser installation now routes through
dep_ensure -> install.{sh,ps1} --ensure, using agent-browser install
for Chromium. install.sh gains ensure_browser() with macOS app-bundle
detection and per-distro guidance.

Tracking: #27826
@askjo/camofox-browser has a dependency (impit) whose postinstall
script runs `npx only-allow pnpm`, which fails under npm. Adding
--ignore-scripts avoids the spurious failure without affecting
functionality.

Tracking: #27826
ensure_browser() now returns 0 explicitly on all success paths.
_run_setup_browser() catches OSError instead of broad Exception,
letting ImportError propagate as a real packaging bug.
@alt-glitch alt-glitch force-pushed the sid/consolidate-bootstrap branch from 94c36fc to afaeaaf Compare May 18, 2026 11:06
@alt-glitch alt-glitch merged commit d9b6f75 into main May 18, 2026
16 of 17 checks passed
@alt-glitch alt-glitch deleted the sid/consolidate-bootstrap branch May 18, 2026 11:06
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: sid/consolidate-bootstrap vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8787 on HEAD, 8787 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4617 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Lillard01 pushed a commit to Lillard01/hermes-agent that referenced this pull request May 21, 2026
…sh,ps1} (NousResearch#27851)

* refactor(bootstrap): consolidate ACP browser bootstrap into install.{sh,ps1}

Delete 687 lines of duplicated browser bootstrap code from
acp_adapter/bootstrap/. All browser installation now routes through
dep_ensure -> install.{sh,ps1} --ensure, using agent-browser install
for Chromium. install.sh gains ensure_browser() with macOS app-bundle
detection and per-distro guidance.

Tracking: NousResearch#27826

* fix(install.sh): add --ignore-scripts to npm install for camofox

@askjo/camofox-browser has a dependency (impit) whose postinstall
script runs `npx only-allow pnpm`, which fails under npm. Adding
--ignore-scripts avoids the spurious failure without affecting
functionality.

Tracking: NousResearch#27826

* fix: add explicit return in ensure_browser, narrow exception in entry.py

ensure_browser() now returns 0 explicitly on all success paths.
_run_setup_browser() catches OSError instead of broad Exception,
letting ImportError propagate as a real packaging bug.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…sh,ps1} (NousResearch#27851)

* refactor(bootstrap): consolidate ACP browser bootstrap into install.{sh,ps1}

Delete 687 lines of duplicated browser bootstrap code from
acp_adapter/bootstrap/. All browser installation now routes through
dep_ensure -> install.{sh,ps1} --ensure, using agent-browser install
for Chromium. install.sh gains ensure_browser() with macOS app-bundle
detection and per-distro guidance.

Tracking: NousResearch#27826

* fix(install.sh): add --ignore-scripts to npm install for camofox

@askjo/camofox-browser has a dependency (impit) whose postinstall
script runs `npx only-allow pnpm`, which fails under npm. Adding
--ignore-scripts avoids the spurious failure without affecting
functionality.

Tracking: NousResearch#27826

* fix: add explicit return in ensure_browser, narrow exception in entry.py

ensure_browser() now returns 0 explicitly on all success paths.
_run_setup_browser() catches OSError instead of broad Exception,
letting ImportError propagate as a real packaging bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/acp Agent Communication Protocol adapter comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant