fix: enable privacy shield toggle via host agent, surface errors#850
Open
yasinBursali wants to merge 2 commits intoLight-Heart-Labs:mainfrom
Open
fix: enable privacy shield toggle via host agent, surface errors#850yasinBursali wants to merge 2 commits intoLight-Heart-Labs:mainfrom
yasinBursali wants to merge 2 commits intoLight-Heart-Labs:mainfrom
Conversation
Add TOGGLABLE_CORE_SERVICES exception so the host agent permits start/stop of privacy-shield while keeping it protected from install/uninstall as a core service. Catch urllib.error.HTTPError before URLError in privacy.py so 403/500 responses are reported with their actual status code instead of the misleading "host agent not reachable" message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. Auth mismatch: dashboard-api container didn't receive DREAM_AGENT_KEY env var, fell back to DASHBOARD_API_KEY. Host agent expected DREAM_AGENT_KEY when set in .env. Fix: pass DREAM_AGENT_KEY to the dashboard-api container in docker-compose.base.yml. 2. Directory check: validate_service_id only checked USER_EXTENSIONS_DIR (data/user-extensions/) for manifest. Core togglable services like privacy-shield live in extensions/services/. Fix: for services in TOGGLABLE_CORE_SERVICES, also check INSTALL_DIR/extensions/services/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
The privacy toggle called
/v1/extension/start|stopwhich blocks core services. Privacy-shield is in CORE_SERVICE_IDS. The 403 error was caught as a generic URLError and replaced with "Host agent not reachable" — misleading since the agent was running and deliberately rejecting the request.How
TOGGLABLE_CORE_SERVICES = {"privacy-shield"}indream-host-agent.py— exempts privacy-shield from the core service gate while preserving its core status everywhere else (dashboard-api still blocks install/uninstall)validate_service_id()also checksINSTALL_DIR/extensions/services/(core extensions live there, not indata/user-extensions/)urllib.error.HTTPErrorcatch beforeURLErrorinprivacy.pyto surface actual error detailsDREAM_AGENT_KEYto dashboard-api container indocker-compose.base.ymlfor auth key alignmentTesting
Platform Impact