Releases: Query-farm/vgi-rpc-python
Releases · Query-farm/vgi-rpc-python
v0.7.1
v0.7.0
Access Log Enrichment
Every vgi_rpc.access log entry now includes full call context:
request_data— base64-encoded Arrow IPC bytes of the request batch (all call parameters)stream_id— UUID correlating all HTTP requests in one logical streamauthenticated— bool from AuthContextclaims— JWT/OAuth claims dicterror_message— raw exception text (truncated to 500 chars) on error entriesserver_version— static string passed toRpcServerat constructionrequest_state/response_state— base64 state token bytes for HTTP exchange streams
Infrastructure
RpcServeracceptsserver_versionparameter- HTTP state token format bumped v2 → v3 (adds
stream_idsegment). Breaking: existing v2 tokens are rejected. _AccessLogContextMiddlewareprevents cross-request contextvar leakage on WSGI thread pools_produce_stream_responsereturns error message alongside error type
Conformance Validator
New vgi_rpc.access_log_conformance CLI module validates access log output against field-presence rules. Language-agnostic — any VGI server implementation can be validated.
python -m vgi_rpc.access_log_conformance /tmp/server.logDocumentation
- New "Access Log" page in docs site
- "Conformance" page added to navigation
v0.6.12
Changes
- Pass
scopes_supportedfrom OAuth resource metadata through to the PKCE middleware so authorization requests advertise the same scopes the server publishes. Falls back toopenid emailwhenscopes_supportedis unset.
v0.6.11
Changes
- Support
pa.RecordBatchandpa.Schemaas dataclass field types._infer_arrow_typenow maps these topa.binary(), matching the existing value serialization/deserialization paths — you can now declare fields aspa.RecordBatch/pa.Schemadirectly without theAnnotated[..., ArrowType(pa.binary())]boilerplate.
v0.6.10
What's Changed
Bug Fixes
- Fix expired token redirect loop: Added JWT
expclaim check in OAuth PKCE middleware'sprocess_request. The landing page path is exempt from_AuthMiddleware, so an expired cookie token would cause an infinite redirect loop — now detected and the OAuth flow re-runs instead.
Improvements
- Themed error pages: Extracted shared HTML styles (
_FONT_IMPORTS,_ERROR_PAGE_STYLE,_VGI_LOGO_HTML) into_common.py. OAuth error page and 404 page now use the branded theme with Inter/JetBrains Mono fonts, green color scheme, logo, and footer. - Pin pygments<2.20: Fixes docs build crash (pymdownx
filename=None). - Origin allowlist for
return_toredirects: Added configurable allowed origins for external frontend redirect validation.
Full Changelog: v0.6.8...v0.6.10
v0.6.9
Changes
- Origin allowlist for return_to redirects:
_vgi_return_toredirects are now restricted to configured allowed origins (default:cupola.query-farm.services) and localhost, preventing open redirect vulnerabilities. - Early auth redirect: Already-authenticated users with a
_vgi_return_toparameter are redirected immediately viaprocess_request, skipping the OAuth flow entirely. - Configurable allowed origins:
_OAuthPkceMiddlewareaccepts anallowed_return_originsparameter to customize the allowlist.
v0.6.8
What's Changed
- Request offline access for external frontends: When
return_tois set, the OAuth authorization URL now includesaccess_type=offlineandprompt=consentso Google returns arefresh_token. This lets external frontends (e.g. DuckDB WASM) silently refresh expired id_tokens without user interaction.
v0.6.7
What's Changed
- External frontend redirect now includes OAuth metadata: The URL fragment on
return_toredirects now passesrefresh_token,token_endpoint,client_id,client_secret, anduse_id_tokenso external frontends can refresh tokens independently. - Token exchange returns refresh_token:
_exchange_code_for_tokennow returns a 3-tuple(token, max_age, refresh_token). - All fragment values are URL-encoded via
urllib.parse.quote.
v0.6.6
What's Changed
- OAuth PKCE external frontend support: Session cookie wire format bumped to v4 with a new
return_tofield. External frontends can pass_vgi_return_toquery parameter to receive auth tokens via URL fragment redirect instead of cookies. - Bug fix: Fixed session cookie cleanup path mismatch in the external redirect branch — the cookie path now correctly matches where it was set (
{prefix}/_oauth/), ensuring browsers actually delete it. - Lint fixes: Sorted
__slots__, import ordering, and indentation cleanup.
v0.6.5
Changes
- HTTP 500 → 200 for server errors: Server errors are now returned as HTTP 200 with an
X-VGI-RPC-Error: trueheader. This ensures clients that discard response bodies on 5xx status codes still receive the Arrow IPC error metadata. Client errors (400/401/404/415) remain unchanged. - CORS:
X-VGI-RPC-Erroris now included in the CORS expose headers. - OAuth PKCE: Added browser-based OAuth PKCE flow support and fixed mypy/ty strict type narrowing issues.