feat(client): add explicit insecure HTTP opt-in across integrations - #1535
Open
frf12 wants to merge 2 commits into
Open
feat(client): add explicit insecure HTTP opt-in across integrations#1535frf12 wants to merge 2 commits into
frf12 wants to merge 2 commits into
Conversation
This was referenced Sep 9, 2026
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.
Which issue or RFC does this PR close?
Closes #1534.
Rationale for this change
A remote PowerContext Server can be reachable from an Agent machine while PowerContext-owned hooks and clients reject its non-loopback HTTP URL. Users currently discover this late, and environment-only workarounds are not durable across sessions. The default should remain secure, with an explicit, visible opt-in for controlled plaintext deployments.
What changes are included in this PR?
--server-urland--allow-insecure-http/--no-allow-insecure-httpto all eight setup targets andsetup select; resolve the effective URL before installation, prompt with default No only in a TTY, and never prompt in JSON/noninteractive mode.~/.config/powercontext/clients.json(orPOWERCONTEXT_CLIENT_CONFIG_FILE), preserving unrelated hosts and rolling back paired native writes on failure.degraded; unsupported or ambiguous native configuration is not reported as safe.Are there any user-facing changes?
Yes. HTTPS and IPv4/IPv6 loopback HTTP remain available by default; non-loopback HTTP needs explicit consent. This intentionally tightens DSH/OpenClaw paths that previously accepted remote plaintext HTTP without consent.
Example:
The flag does not disable TLS certificate verification, configure credentials, change Server binding/authentication, or override host-owned MCP policy.
doctorreturns a nonzero status fordegradedplaintext transport even when the endpoint is reachable.Codex uses its installed
.mcp.jsonas the common hook/MCP endpoint; rerun setup after an update replaces it. DSH's standard empty patch is supported, but custom runtime overlays require manual alignment/removal before setup: the installer fails before mutation rather than silently saving an endpoint that the native override would ignore. Unsupported JSON5/includes and ambiguous cached endpoints are reported as unknown.How was this change tested?
python -m pytest --doctest-modules, deselecting the four baseline failures listed below: 2,205 passed, 64 skipped, 4 deselected; three packaging cases failed during dependency download (pypi.orgTLS EOF for hatchling/hatch-vcs), not test assertions about the implementation. Re-ran all three package suites withUV_FROZEN=true UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple python -m pytest tests/langchain_middleware/test_packaging.py tests/langgraph_adapter/test_packaging.py tests/pydantic_ai_adapter/test_packaging.py -q: 3 passed.prek run -a,ruff check,ruff format --check,ty check,ty check integrations/pydantic-ai/src, andgit diff --check: passed.pnpm lintandpnpm build: passed; 785 public pages and internal links verified. Integration-manifest consistency checks passed.invalid/modelbefore its capture callback. These unrelated cases are unchanged.Acceptance boundaries: validated on macOS with Python 3.12; no production deployment or blanket fresh-session acceptance across every real Agent/native MCP implementation is claimed. TLS verification regression tests are mocked rather than a live certificate-handshake test.
AI usage statement
OpenAI Codex assisted with implementation, tests, documentation, and parallel code review under human-provided requirements. Review findings led to additional endpoint-binding, environment-refusal, native-diagnostics and persistence-rollback regressions.