@dbx-tools/dbx-model-catalog 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,24 +51,28 @@ The `/browser` entry point exports `loadModelCatalog()` and
51
51
  `createModelCatalogClient()` for browser and worker use. Both use the same
52
52
  TypeScript filtering and ranked-search implementation as the Node entry point.
53
53
 
54
- Use the bundled snapshot for synchronous matching and enrichment of endpoints
55
- that another client already discovered:
54
+ Load the public catalog remotely when matching and enriching endpoints that
55
+ another client already discovered:
56
56
 
57
57
  ```ts
58
58
  import {
59
- bundledModelCatalogIndex,
60
59
  enrichLiveModels,
61
- } from "@dbx-tools/dbx-model-catalog/snapshot";
60
+ loadModelCatalogIndex,
61
+ } from "@dbx-tools/dbx-model-catalog/browser";
62
+
63
+ const modelCatalogIndex = await loadModelCatalogIndex();
62
64
 
63
65
  const enriched = enrichLiveModels(
64
- bundledModelCatalogIndex,
66
+ modelCatalogIndex,
65
67
  liveEndpoints,
66
68
  endpoint => [endpoint.name, endpoint.modelServiceName].filter(Boolean),
67
69
  );
68
70
  ```
69
71
 
70
72
  The join preserves live records that have no public catalog match. Workspace
71
- discovery remains authoritative when documentation lags.
73
+ discovery remains authoritative when documentation lags. The npm package does
74
+ not embed a catalog snapshot; catalog and search data are fetched from the
75
+ published schema URL.
72
76
 
73
77
  The local explorer demo uses the explicit Pynect adapter to connect to the
74
78
  Python server:
package/dist/browser.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { CatalogClient } from "./types.js";
2
+ import { type ModelCatalogIndex } from "./catalog-index.js";
2
3
  export type * from "./_generated/schemas.js";
3
4
  export type * from "./types.js";
4
5
  export { PUBLISHED_CATALOG_DATABASE_URL, PUBLISHED_CATALOG_INDEX_URL, PUBLISHED_CATALOG_ROOT_URL, PUBLISHED_CATALOG_SCHEMA_URL, PUBLISHED_CATALOG_SCHEMA_VERSION, PUBLISHED_CATALOG_SEARCH_INDEX_URL, PUBLISHED_CATALOG_URL, } from "./_generated/published.js";
@@ -8,6 +9,7 @@ export interface LoadModelCatalogOptions {
8
9
  searchIndexUrl?: string;
9
10
  }
10
11
  export declare function loadModelCatalog(options?: LoadModelCatalogOptions): Promise<CatalogClient>;
12
+ export declare function loadModelCatalogIndex(options?: LoadModelCatalogOptions): Promise<ModelCatalogIndex>;
11
13
  export * from "./catalog-index.js";
12
14
  export * from "./identity.js";
13
15
  export * from "./validation.js";