Skip to content

v6.10.0

Choose a tag to compare

@58bits 58bits released this 22 Oct 04:43
· 22 commits to develop since this release

Highlights

  • @byline/core, @byline/client: Integer range facets in the search contract. A search request can now ask the provider for histogram buckets over an integer field, for example publication counts per year beside a filtered list. SearchQuery.rangeFacets takes SearchRangeFacetRequest[] ({ field, start, end, gap }), and SearchResults.rangeFacets returns { start, end, count } buckets keyed by field. Buckets are contiguous, ascending and cover [start, end). Zero-count buckets are included, and the final bucket is truncated at end when the interval is not a multiple of gap. Counts respect the query, where, locale, status and the collection or zone scope, independently of pagination. Both client.collection(path).search() and the zone client.search() forward the option and return the buckets. When beforeRead row scoping or unreadable zone members restrict aggregates, rangeFacets is omitted, just as term facets are.

    The client validates requests before calling the provider and rejects invalid ones with ERR_VALIDATION. A request needs capabilities.rangeFacets: true on the provider, finite start, end and gap, gap > 0, end > start, and no more than MAX_RANGE_FACET_BUCKETS (200, exported from @byline/core) buckets per field. Each field may appear once and must be a top-level integer field declared in the collection's search.filters. For a zone, that rule applies to every member collection. Bounds may be fractional; a provider that cannot represent them must reject the request rather than round it. An omitted option or empty array requests nothing and is not forwarded to the provider.

    The built-in PostgreSQL and MySQL providers do not implement range facets and leave the capability unset. The feature is for custom providers, such as a Solr or OpenSearch driver. See Search API → Request a histogram and Provider contract → Integer range facets.

  • @byline/core: New structuredFilters capability. SearchCapabilities.structuredFilters lets a provider declare that it actually applies SearchQuery.where. It only advertises support: the client still forwards where unchanged to providers without it, so existing callers are unaffected. Use it to detect providers that silently ignore filters. The built-in PostgreSQL and MySQL providers do not apply where, so a host that combines text search with filters can now check provider.capabilities.structuredFilters === true and fall back rather than show unfiltered results. A provider that sets it may support a documented subset of fields and operators, but must reject anything outside that subset rather than ignore part of the predicate.

Chores

  • @byline/ai: Updated the provider SDKs, including @anthropic-ai/sdk from 0.134 to 1.1 (a new major) and openai to 7.42. Byline's provider adapters build and type-check against both, and the public @byline/ai API is unchanged.
  • monorepo: Updated dependencies across the workspace, including TanStack Router/Start, @aws-sdk/*, jose, intl-messageformat, @codemirror/view, motion, Vite 8.3.5, Vitest 5.0.5, Storybook 10.6.3, knip 6.42 and Biome 2.6.2. The repository's Biome configuration has not yet been migrated to 2.6; that follows separately.

All other @byline/* packages bumped to 6.10.0 in lockstep with no behavioural changes this cycle.