OAuth client: harden SEP-2352/SEP-2350 edge cases; fix conformance comment (#2936)
This commit is contained in:
parent
2397319a68
commit
5e013d9c54
1 changed files with 277 additions and 17 deletions
14
.github/actions/conformance/client.py
vendored
14
.github/actions/conformance/client.py
vendored
|
|
@ -7,8 +7,9 @@ Contract:
|
|||
- MCP_CONFORMANCE_SCENARIO env var -> scenario name
|
||||
- MCP_CONFORMANCE_CONTEXT env var -> optional JSON (for client-credentials scenarios)
|
||||
- MCP_CONFORMANCE_PROTOCOL_VERSION env var -> spec version the harness mock
|
||||
server is speaking (e.g. "2025-11-25", "2026-07-28"). Always set; defaults
|
||||
to the harness's LATEST_SPEC_VERSION when --spec-version is omitted.
|
||||
server is speaking (e.g. "2025-11-25", "2026-07-28"). Always set; when
|
||||
--spec-version is omitted the harness picks per-scenario (LATEST_SPEC_VERSION
|
||||
for active scenarios, DRAFT_PROTOCOL_VERSION for draft-only ones).
|
||||
- Server URL as last CLI argument (sys.argv[1])
|
||||
- Must exit 0 within 30 seconds
|
||||
|
||||
|
|
@ -54,10 +55,11 @@ logging.basicConfig(
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
#: Spec version the harness is running this scenario at (e.g. "2025-11-25",
|
||||
#: "2026-07-28"). The harness always sets this (it falls back to its own
|
||||
#: LATEST_SPEC_VERSION when --spec-version is omitted), so None means we were
|
||||
#: invoked outside the harness. Handlers that need to take the stateless 2026
|
||||
#: path will branch on this once the SDK has one; today it is logged only.
|
||||
#: "2026-07-28"). The harness always sets this (when --spec-version is omitted
|
||||
#: it picks per-scenario: LATEST_SPEC_VERSION for active scenarios,
|
||||
#: DRAFT_PROTOCOL_VERSION for draft-only ones), so None means we were invoked
|
||||
#: outside the harness. Handlers that need to take the stateless 2026 path will
|
||||
#: branch on this once the SDK has one; today it is logged only.
|
||||
PROTOCOL_VERSION: str | None = os.environ.get("MCP_CONFORMANCE_PROTOCOL_VERSION")
|
||||
|
||||
# Type for async scenario handler functions
|
||||
|
|
|
|||
Loading…
Reference in a new issue