Implement OAuth for SDK - #16
Open
bettercallsaulj wants to merge 13 commits into
Open
Conversation
added 11 commits
August 13, 2026 20:50
Summary: - Preserve native-owned char pointers as c_void_p for agent and API responses. - Decode owned strings with ctypes.string_at and release them through gopher_orch_free. - Cover owned response freeing and null-return behavior in FFI tests.
Summary: - Add server option fields to the Python ctypes agent options struct. - Preserve global runtime option behavior with null server options and zero count. - Add regression coverage for native field order and default server-option values.
Summary: - Add OAuth create options, token records, and token-store protocol types. - Preserve runtime option compatibility while carrying SDK OAuth metadata. - Export OAuth create types and cover normalization and validation behavior.
Summary: - Add Python SDK OAuth PKCE, loopback, discovery, registration, token exchange, and token cache helpers. - Add resolver support for challenge probing, compatible issuer checks, and runtime token merging. - Cover the new OAuth helpers with local and hook-based tests.
Summary: - Add OAuth-aware async create paths for direct URL, server config, API key, server selectors, and gateway selectors. - Fetch scoped API configs before OAuth resolution so async selector factories create from the resolved JSON config. - Cover async factory resolver wiring, skip paths, routed config fetches, and resolved-token propagation.
Summary: - Add Python parity tests for authorization URL construction, browser opening, runtime option merging, and loopback callback failures. - Add a local OAuth create-with-URL integration test covering discovery, registration, authorization redirect, token exchange, and native token propagation. - Wrap browser opener failures with the authorization URL for actionable OAuth diagnostics.
Summary: - Add a weakref finalizer that releases forgotten native agent handles on a best-effort basis. - Keep dispose() deterministic and idempotent by invoking and detaching the finalizer path at most once. - Add lifecycle tests for explicit dispose, context manager cleanup, GC fallback, and no double release.
Summary: Add a Gopher-hosted MCP OAuth fallback for 404 probes, support synthetic protected-resource metadata in the resolver, fix path-based OIDC discovery, and cover the flow with discovery/resolver regression tests.
Summary: Remove the new async factory surface, run SDK OAuth resolution from the existing GopherAgent factory names, keep native-path tests explicit with oauth disabled, and update OAuth factory coverage to match the gopher-mcp-js API shape.
Summary: Install gopher-mcp-python and the matching native package through the shared PyPI example runner. Keep create_with_url using the synchronous API while passing optional access token or OAuth runtime options. Warn when OAuth is disabled without a bearer token for protected MCP URLs.
Prepare release v0.1.34: - Update pyproject.toml to version 0.1.34 - Update platform packages to version 0.1.34 - Update CHANGELOG.md: [Unreleased] -> [0.1.34] - 2026-08-16 gopher-orch version: 0.1.34 Changes in this release: ### Changed - Pin `gopher-orch` native library to [v0.1.34](https://github.com/GopherSecurity/gopher-orch/releases/tag/v0.1.34). #### SDK changes since v0.1.30 - Use PyPI libs for create by URL example - Keep OAuth on existing factories (#15) - Fix hosted MCP OAuth fallback (#15) - Fix agent finalizer fallback (#15) - Fix OAuth parity coverage (#15) - Fix OAuth async agent factories (#15) - Fix OAuth helper modules (#15)
bettercallsaulj
force-pushed
the
feature/sdk-oauth
branch
from
August 16, 2026 12:29
c726968 to
c71cdde
Compare
added 2 commits
August 16, 2026 20:35
Summary: Keep Linux native dependency and RPATH checks in verify-examples while treating bundled OpenSSL in preflight-installed packages as a warning. Avoid failing PR example verification against already-published native wheels that still bundle OpenSSL. Update packaging workflow regression coverage for the verify-examples policy.
Summary: Generate GitHub release notes from the promoted versioned CHANGELOG.md section instead of empty Unreleased notes. Fall back to recent commits only when the matching version section is missing. Add workflow regression coverage for versioned release-note extraction.
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.
No description provided.