Repository navigation
v0.8.0 — Bearer Tokens, Truncated Reads & Cross-Parent Addresses
Release notes:
This release adds bearer tokens for hosted MCP connectors, plumbs truncate_text through the search methods, and types the cross-parent read addresses of strict-reference collections. Everything below is available on both the sync and the async client.
Highlights
Bearer tokens
Hosted MCP connectors (the Claude API's mcp_servers, among others) accept a single token and always send it as Authorization: Bearer <token> — the scheme is not selectable, so Simple and Secure could not be used with them at all.
issue_flux_api_key_bearer_token(key)(sync + async) — issue or replace the token on an existing Flux API key.revoke_flux_api_key_bearer_token(key)(sync + async) — revoke it.- New
FluxAPIKeyBearerTokenmodel for the one-time response. FluxAPIKeySummarygainsbearer_token_prefixandbearer_token_issued_at, both defaulting toNone.
token = client.issue_flux_api_key_bearer_token("flux_key_v1")
# pass token.bearer_token to the connector — it is shown only once
client.revoke_flux_api_key_bearer_token("flux_key_v1")- The token identifies the key and nothing more: role, grants and per-collection permissions are the key's own.
- The plaintext is returned only once. Only a hash is stored, as for
secret_key— a lost token is re-issued, not recovered. Later reads expose onlybearer_token_prefix(first 12 characters). - Issuing, re-issuing and revoking leave
public_key,secret_key,roleand grants untouched, so re-issuing cuts off a connector without disturbing anything using the key pair. - Requires a server with bearer-token support; against an older one both methods return
404.
truncate_text on reads
search()(sync + async) accepts a keyword-onlyparamsmapping, forwarded to the query string. With the existing passthrough onlist_resources(), both List Resources and Search now supporttruncate_text— an integer ≥ 1 that caps everytext-typed field, ignored whenraw=True. Truncated fields are marked under_sys.truncated.vector_search,vector_field_search,hybrid_searchandboosted_searchacceptquery_params.- Named
query_params, notparams:paramswas already meaningful inside**extra_body, so an explicitparamskeyword would have silently rerouted it to the query string for callers already passing it as a search-body field. Passingtruncate_textas a body field now raises and namesquery_params.
Cross-parent read addresses
add_api_collection/update_api_collection— and the deprecatedadd_api_folder/update_api_folder— acceptunscoped_levels: list[int]andunscoped_ancestors: list[str], exposing read-only addresses that drop the ancestor chain entirely (level == 0) or partially (level >= 1).APIFolderSummary(aliasedAPICollectionSummary) gainsunscoped_levels,unscoped_ancestors,expose_owner,flat_routeandflat_routes, with newFlatRouteandFlatRouteSummarymodels.- These models now set
extra="allow", so unrecognised fields are preserved rather than dropped. - The API requires
unscoped_levelsandunscoped_ancestorsto be sent together; not enforced client-side, since the server owns that rule.
Fixed
DEFAULT_USER_AGENTwas pinned tofoxnose-sdk/0.1.0regardless of the installed version, so every release reported0.1.0. The version now lives in a single_version.pyread by bothfoxnose_sdk.__version__andconfig.py.
Breaking changes
- None. The new
APIFolderSummaryfields carry defaults, so existing code is unaffected.
Install
pip install --upgrade foxnose-sdk