Skip to content

feat(qvac-lib-registry-client): add findBy() method using schema's findBy#146

Closed
simon-iribarren wants to merge 5 commits into
tetherto:mainfrom
simon-iribarren:feature-registry-client-use-findby
Closed

feat(qvac-lib-registry-client): add findBy() method using schema's findBy#146
simon-iribarren wants to merge 5 commits into
tetherto:mainfrom
simon-iribarren:feature-registry-client-use-findby

Conversation

@simon-iribarren

@simon-iribarren simon-iribarren commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Add findBy(params) method to QVACRegistryClient that delegates to the schema's RegistryDatabase.findBy() for efficient indexed queries.

Why

The registry client previously only exposed low-level index-specific methods (findModelsByEngine, findModelsByName, etc.), requiring callers to choose the right index manually. The new findBy() provides a single entry point that automatically selects the most efficient HyperDB index based on the provided params — including the new compound engine + quantization index added in #145.

The addon/modelType filter is intentionally excluded from this method. It is a derived concept (engine → addon mapping) that exists only in the SDK layer, not in the database schema. The SDK server handler applies this mapping after receiving results from the client.

Changes

  • client/lib/client.js: Add findBy() method delegating to this.db.findBy()
  • client/index.d.ts: Add FindByParams interface and findBy type definition

Dependencies

This PR depends on #145 — the schema package must be published with findBy() and the compound index before this can be merged.

Merge order

  1. feat(qvac-registry-schema): add findBy() method to RegistryDatabase #145 (schema: compound index + findBy()) → publish @tetherto/qvac-registry-schema

@simon-iribarren simon-iribarren requested review from a team as code owners February 5, 2026 20:47
@simon-iribarren simon-iribarren changed the base branch from feature-qvac-sdk-model-registry to main February 6, 2026 08:16
@simon-iribarren simon-iribarren force-pushed the feature-registry-client-use-findby branch from 7bd3fc7 to 9f371d1 Compare February 6, 2026 08:17
…ndBy

Add findBy(params) method to QVACRegistryClient that delegates to the
schema's RegistryDatabase.findBy() method for efficient indexed queries.

Changes:
- Add findBy() method to client that delegates to this.db.findBy()
- Add FindByParams interface and findBy type definition
- Mark existing findModels* methods as legacy in type definitions

Depends on: qvac-registry-schema with findBy() support
@simon-iribarren simon-iribarren force-pushed the feature-registry-client-use-findby branch from 9f371d1 to eeeeac2 Compare February 6, 2026 08:19
@simon-iribarren simon-iribarren marked this pull request as draft February 6, 2026 08:20
simon-iribarren and others added 2 commits February 9, 2026 13:33
Update the schema dependency to use the newly released v0.2.1 which
includes the findBy() method and compound index support. Add findBy
to the client API surface and async function tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@simon-iribarren simon-iribarren marked this pull request as ready for review February 9, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants