Update: Refactor native auth routing and harness attachment#10
Merged
SI-RUI-ZHANG merged 14 commits intomainfrom Mar 11, 2026
Merged
Update: Refactor native auth routing and harness attachment#10SI-RUI-ZHANG merged 14 commits intomainfrom
SI-RUI-ZHANG merged 14 commits intomainfrom
Conversation
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.
原问题
The middleware native-auth branch had accumulated fallback-style auth logic, inconsistent OpenClaw and OpenCode support decisions, and harness-specific setup behavior embedded directly in the CLI flow. Live smoke was not strict enough to act as a reliable release gate, and Codex remained a special case because harness attachment was not modeled as a first-class abstraction.
本次修复
Refactored the native-auth stack around strict harness-owned auth reuse and exact selected-state preservation. Added a shared provider-policy layer, split runtime request/upstream planning, extracted first-class harness adapters for Codex/OpenCode/OpenClaw/Claude, removed remaining OpenClaw managed-mode normal-path behavior, tightened smoke infrastructure and live smoke gating, and aligned supported-client documentation with the actual product contract.
Changed files list
CONTRIBUTING.md
QUICKSTART.md
README.md
findings.md
modeio_middleware/cli/gateway.py
modeio_middleware/cli/harness_adapters/init.py
modeio_middleware/cli/harness_adapters/base.py
modeio_middleware/cli/harness_adapters/claude.py
modeio_middleware/cli/harness_adapters/codex.py
modeio_middleware/cli/harness_adapters/openclaw.py
modeio_middleware/cli/harness_adapters/opencode.py
modeio_middleware/cli/harness_adapters/registry.py
modeio_middleware/cli/setup.py
modeio_middleware/cli/setup_lib/common.py
modeio_middleware/cli/setup_lib/openclaw.py
modeio_middleware/cli/setup_lib/openclaw_common.py
modeio_middleware/cli/setup_lib/openclaw_routes.py
modeio_middleware/cli/setup_lib/openclaw_transaction.py
modeio_middleware/cli/setup_lib/opencode.py
modeio_middleware/cli/setup_lib/upstream.py
modeio_middleware/connectors/anthropic_http.py
modeio_middleware/connectors/openai_http.py
modeio_middleware/core/client_auth.py
modeio_middleware/core/contracts.py
modeio_middleware/core/engine.py
modeio_middleware/core/pipeline_orchestrator.py
modeio_middleware/core/plugin_manager.py
modeio_middleware/core/provider_auth.py
modeio_middleware/core/provider_policy.py
modeio_middleware/core/request_context.py
modeio_middleware/core/stream_orchestrator.py
modeio_middleware/core/upstream_client.py
modeio_middleware/core/upstream_plan.py
modeio_middleware/core/upstream_strategy.py
modeio_middleware/core/upstream_transport.py
modeio_middleware/http_transport.py
modeio_middleware/plugins/redact_utils.py
modeio_middleware/runtime_control.py
progress.md
scripts/smoke_agent_matrix.py
scripts/smoke_e2e.sh
scripts/smoke_matrix/agents.py
scripts/smoke_matrix/common.py
scripts/smoke_matrix/models.py
scripts/smoke_matrix/openclaw_family.py
scripts/smoke_matrix/outcome.py
scripts/smoke_matrix/runner.py
scripts/smoke_matrix/sandbox.py
scripts/upstream_tap_proxy.py
task_plan.md
tests/README.md
tests/helpers/gateway_harness.py
tests/helpers/inspection_builder.py
tests/helpers/openclaw_builder.py
tests/integration/test_gateway_contract.py
tests/integration/test_monitoring_api.py
tests/integration/test_plugin_management_api.py
tests/integration/test_protocol_stdio_runtime.py
tests/smoke/test_smoke_agent_matrix_support.py
tests/smoke/test_smoke_client_setup_flows.py
tests/smoke/test_smoke_opencode_flow.py
tests/unit/test_client_auth.py
tests/unit/test_harness_adapters.py
tests/unit/test_http_transport.py
tests/unit/test_provider_policy.py
tests/unit/test_setup_gateway.py
tests/unit/test_upstream_client.py
tests/unit/test_upstream_tap_proxy.py
Reviewer: @SI-RUI-ZHANG