@dbx-tools/dbx-model-catalog 0.0.0-stage → 0.1.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.
Files changed (40) hide show
  1. package/README.md +23 -2
  2. package/dist/_generated/channels.d.ts +17 -0
  3. package/dist/_generated/index.d.ts +3 -0
  4. package/dist/_generated/schemas.d.ts +329 -0
  5. package/dist/browser.d.ts +7 -0
  6. package/dist/browser.js +1207 -0
  7. package/dist/browser.js.map +15 -0
  8. package/dist/cli.d.ts +2 -0
  9. package/dist/cli.js +50296 -0
  10. package/dist/cli.js.map +246 -0
  11. package/dist/client.d.ts +3 -0
  12. package/dist/index.d.ts +15 -0
  13. package/dist/index.js +50205 -0
  14. package/dist/index.js.map +245 -0
  15. package/dist/python/pyproject.toml +16 -0
  16. package/dist/python/src/dbx_model_catalog/__init__.py +79 -0
  17. package/dist/python/src/dbx_model_catalog/__pycache__/__init__.cpython-312.pyc +0 -0
  18. package/dist/python/src/dbx_model_catalog/__pycache__/client.cpython-312.pyc +0 -0
  19. package/dist/python/src/dbx_model_catalog/__pycache__/database.cpython-312.pyc +0 -0
  20. package/dist/python/src/dbx_model_catalog/__pycache__/filters.cpython-312.pyc +0 -0
  21. package/dist/python/src/dbx_model_catalog/__pycache__/models.cpython-312.pyc +0 -0
  22. package/dist/python/src/dbx_model_catalog/__pycache__/query.cpython-312.pyc +0 -0
  23. package/dist/python/src/dbx_model_catalog/__pycache__/search.cpython-312.pyc +0 -0
  24. package/dist/python/src/dbx_model_catalog/client.py +248 -0
  25. package/dist/python/src/dbx_model_catalog/database.py +296 -0
  26. package/dist/python/src/dbx_model_catalog/filters.py +41 -0
  27. package/dist/python/src/dbx_model_catalog/models.py +847 -0
  28. package/dist/python/src/dbx_model_catalog/publishing.py +27 -0
  29. package/dist/python/src/dbx_model_catalog/py.typed +0 -0
  30. package/dist/python/src/dbx_model_catalog/query.py +593 -0
  31. package/dist/python/src/dbx_model_catalog/schema/__init__.py +0 -0
  32. package/dist/python/src/dbx_model_catalog/schema/model-catalog.schema.json +1016 -0
  33. package/dist/python/src/dbx_model_catalog/search.py +912 -0
  34. package/dist/python/src/dbx_model_catalog_server/__init__.py +3 -0
  35. package/dist/python/src/dbx_model_catalog_server/__pycache__/__init__.cpython-312.pyc +0 -0
  36. package/dist/python/src/dbx_model_catalog_server/__pycache__/app.cpython-312.pyc +0 -0
  37. package/dist/python/src/dbx_model_catalog_server/app.py +142 -0
  38. package/dist/python/uv.lock +927 -0
  39. package/dist/types.d.ts +8 -0
  40. package/package.json +52 -4
package/README.md CHANGED
@@ -1,3 +1,24 @@
1
- # Temporary Holding Version
1
+ # @dbx-tools/dbx-model-catalog
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The Node client connects to the Python-owned model catalog contract. It starts a
4
+ local Pynect worker by default or connects to a remote Chanx WebSocket server
5
+ when a URL is provided.
6
+
7
+ ```ts
8
+ import { connectModelCatalog } from "@dbx-tools/dbx-model-catalog";
9
+
10
+ await using local = await connectModelCatalog();
11
+ const matches = await local.client.list({ query: "gpt", limit: 10 });
12
+
13
+ await using remote = await connectModelCatalog("wss://catalog.example.com");
14
+ const catalog = await remote.client.catalog();
15
+ ```
16
+
17
+ Pass `{ python: "/path/to/python" }` to select the Python executable used for
18
+ the local worker. The npm artifact includes the Python service source; Pynect
19
+ uses uv to provision its isolated environment on the first local connection.
20
+ Generated catalog types are re-exported from this package. The package does not
21
+ contain a separate JavaScript schema implementation.
22
+
23
+ For direct public ingestion without the service client, fetch:
24
+ <https://reggie-db.github.io/dbx-model-catalog/catalog.json>.
@@ -0,0 +1,17 @@
1
+ import type { GetCatalogRequest, GetCatalogResponse, GetSearchIndexRequest, GetSearchIndexResponse, ListModelsRequest, ListModelsResponse, StreamModelsRequest, StreamModelsResponse } from './schemas.js';
2
+ export type ModelsToServer = GetCatalogRequest | GetSearchIndexRequest | ListModelsRequest | StreamModelsRequest;
3
+ export type ModelsToClient = GetCatalogResponse | GetSearchIndexResponse | ListModelsResponse | StreamModelsResponse;
4
+ export type ModelsReplies = {
5
+ get_catalog: GetCatalogResponse;
6
+ get_search_index: GetSearchIndexResponse;
7
+ list_models: ListModelsResponse;
8
+ stream_models: StreamModelsResponse;
9
+ };
10
+ export declare const models: import("@chanx-js/client").ChannelDescriptor<ModelsToServer, ModelsToClient, "/ws/models", Record<never, never>, ModelsReplies> & {
11
+ streamActions: readonly ["stream_models"];
12
+ };
13
+ export declare const channels: {
14
+ readonly models: import("@chanx-js/client").ChannelDescriptor<ModelsToServer, ModelsToClient, "/ws/models", Record<never, never>, ModelsReplies> & {
15
+ streamActions: readonly ["stream_models"];
16
+ };
17
+ };
@@ -0,0 +1,3 @@
1
+ export * from './schemas.js';
2
+ export * from './channels.js';
3
+ export { createPynectClient, type PynectClientOptions } from 'pynect';
@@ -0,0 +1,329 @@
1
+ /** Model availability on one Databricks cloud provider. */
2
+ export interface Availability {
3
+ status: Status1;
4
+ serving_modes: Array<ServingMode>;
5
+ details?: string | null;
6
+ }
7
+ /** Normalized Databricks price in one currency. */
8
+ export interface AveragePrice {
9
+ unit: Unit;
10
+ rates: Record<string, number>;
11
+ }
12
+ /** Task-suite benchmark result. */
13
+ export interface Benchmark {
14
+ name: string;
15
+ rank: number;
16
+ score: number;
17
+ task_count: number;
18
+ published_at?: string | null;
19
+ variant?: Variant2 | null;
20
+ sources: Array<SourceLink>;
21
+ }
22
+ /** Supported reasoning-token budget range. */
23
+ export interface Budget {
24
+ min?: number | null;
25
+ max?: number | null;
26
+ }
27
+ /** Capabilities used to select the model for a workload. */
28
+ export interface Capabilities {
29
+ attachments?: boolean | null;
30
+ tools?: boolean | null;
31
+ structured_output?: boolean | null;
32
+ temperature?: boolean | null;
33
+ interleaved_reasoning?: boolean | null;
34
+ web_search: boolean;
35
+ reasoning?: Reasoning | Reasoning1 | null;
36
+ }
37
+ export interface CatalogFilters {
38
+ query?: string | null;
39
+ status?: Array<Status>;
40
+ type?: Array<Type>;
41
+ publisher?: Array<string>;
42
+ task?: Array<string>;
43
+ capability?: Array<"attachments" | "reasoning" | "structured-output" | "tools" | "web-search">;
44
+ limit?: number | null;
45
+ }
46
+ /** Published statistics for one Databricks model. */
47
+ export interface CatalogModel {
48
+ name: string;
49
+ description: string;
50
+ aliases: Array<string>;
51
+ type: Type;
52
+ family?: string | null;
53
+ publisher?: string | null;
54
+ license?: string | null;
55
+ open_weights?: boolean | null;
56
+ status: Status;
57
+ release_date?: string | null;
58
+ last_updated?: string | null;
59
+ knowledge_cutoff?: string | null;
60
+ retirement?: Retirement | null;
61
+ modalities: Modalities;
62
+ capabilities: Capabilities;
63
+ limits?: Limits | null;
64
+ tasks: Array<string>;
65
+ use_cases: Array<string>;
66
+ availability: Record<string, Availability>;
67
+ price: Record<string, Record<string, Price>>;
68
+ average_price: Record<string, AveragePrice>;
69
+ sources: Record<string, Array<SourceLink>>;
70
+ notices: Array<Notice>;
71
+ rankings: Array<Rankings | Rankings1>;
72
+ benchmarks: Array<Benchmark>;
73
+ }
74
+ export interface CatalogModelRecord {
75
+ name: string;
76
+ description: string;
77
+ aliases: Array<string>;
78
+ type: Type;
79
+ family?: string | null;
80
+ publisher?: string | null;
81
+ license?: string | null;
82
+ open_weights?: boolean | null;
83
+ status: Status;
84
+ release_date?: string | null;
85
+ last_updated?: string | null;
86
+ knowledge_cutoff?: string | null;
87
+ retirement?: Retirement | null;
88
+ modalities: Modalities;
89
+ capabilities: Capabilities;
90
+ limits?: Limits | null;
91
+ tasks: Array<string>;
92
+ use_cases: Array<string>;
93
+ availability: Record<string, Availability>;
94
+ price: Record<string, Record<string, Price>>;
95
+ average_price: Record<string, AveragePrice>;
96
+ sources: Record<string, Array<SourceLink>>;
97
+ notices: Array<Notice>;
98
+ rankings: Array<Rankings | Rankings1>;
99
+ benchmarks: Array<Benchmark>;
100
+ id: string;
101
+ }
102
+ export interface CatalogSearchIndexDocument {
103
+ id: string;
104
+ exact_identities: Array<string>;
105
+ identities: Array<string>;
106
+ keywords: string;
107
+ description: string;
108
+ tokens: Array<string>;
109
+ family?: string | null;
110
+ version: Array<number>;
111
+ quality_score: number;
112
+ scores: CatalogSearchQualityScores;
113
+ }
114
+ export interface CatalogSearchIndexPayload {
115
+ schema_version: number;
116
+ catalog_schema_version: number;
117
+ updated_at: string;
118
+ weights: CatalogSearchWeights;
119
+ documents: Array<CatalogSearchIndexDocument>;
120
+ }
121
+ export interface CatalogSearchQualityScores {
122
+ leaderboard: number;
123
+ benchmark: number;
124
+ version: number;
125
+ freshness: number;
126
+ lifecycle: number;
127
+ }
128
+ export interface CatalogSearchWeights {
129
+ relevance: number;
130
+ leaderboard: number;
131
+ benchmark: number;
132
+ version: number;
133
+ freshness: number;
134
+ lifecycle: number;
135
+ }
136
+ /** Default reasoning effort when no level is specified. */
137
+ export type DefaultEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "default";
138
+ /** Normalized reasoning effort level. */
139
+ export type EffortEnum = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "default";
140
+ export interface GetCatalogRequest {
141
+ action: "get_catalog";
142
+ payload: CatalogFilters;
143
+ }
144
+ export interface GetCatalogResponse {
145
+ action: "catalog";
146
+ payload: ModelCatalog;
147
+ }
148
+ export interface GetSearchIndexRequest {
149
+ action: "get_search_index";
150
+ payload: CatalogFilters;
151
+ }
152
+ export interface GetSearchIndexResponse {
153
+ action: "search_index";
154
+ payload: CatalogSearchIndexPayload;
155
+ }
156
+ /** Known model input and output modalities. */
157
+ export type Input = "text" | "image" | "audio" | "video" | "application/pdf" | "embedding" | "reranking" | "decision";
158
+ /** Known Databricks documentation notice kinds. */
159
+ export type Kind = "note" | "important" | "warning" | "tip" | "caution" | "info";
160
+ /** Documented token limits. */
161
+ export interface Limits {
162
+ context?: number | null;
163
+ input?: number | null;
164
+ output?: number | null;
165
+ }
166
+ export interface ListModelsRequest {
167
+ action: "list_models";
168
+ payload: CatalogFilters;
169
+ }
170
+ export interface ListModelsResponse {
171
+ action: "models";
172
+ payload: Array<CatalogModelRecord>;
173
+ }
174
+ /** Model input and output modalities. */
175
+ export interface Modalities {
176
+ input: Array<Input | string>;
177
+ output: Array<Output | string>;
178
+ }
179
+ /** Published Databricks model catalog with identity, capabilities, availability, pricing, lifecycle, rankings, and benchmarks. */
180
+ export interface ModelCatalog {
181
+ schema_version: 15;
182
+ updated_at: string;
183
+ models: Record<string, CatalogModel>;
184
+ }
185
+ /** Important Databricks documentation notice. */
186
+ export interface Notice {
187
+ kind: Kind | string;
188
+ title?: string | null;
189
+ text: string;
190
+ sources: Array<SourceLink>;
191
+ }
192
+ /** Known model input and output modalities. */
193
+ export type Output = "text" | "image" | "audio" | "video" | "application/pdf" | "embedding" | "reranking" | "decision";
194
+ /** Normalized Databricks price in one currency. */
195
+ export interface Price {
196
+ unit: Unit;
197
+ rates: Record<string, number>;
198
+ }
199
+ /** An RFC 9457 problem details object, the payload of an error frame. See https://python.chanx.dev/en/latest/protocol.html#protocol-errors */
200
+ export interface ProblemDetails {
201
+ /** A URI reference that identifies the problem type. */
202
+ type: string;
203
+ /** A short, human-readable summary of the problem type. */
204
+ title: string;
205
+ /** The HTTP status code generated by the origin server for this occurrence of the problem. */
206
+ status?: number;
207
+ /** A human-readable explanation specific to this occurrence of the problem. */
208
+ detail: string;
209
+ /** A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. */
210
+ instance?: string;
211
+ /** The validation failures, when type is validation-failed. */
212
+ errors?: Array<ValidationFailure>;
213
+ }
214
+ /** Competitive ranking based on human preference ratings. */
215
+ export interface Rankings {
216
+ domain: string;
217
+ category: string;
218
+ rank: number;
219
+ published_at?: string | null;
220
+ variant?: Variant | null;
221
+ sources: Array<SourceLink>;
222
+ metric: "rating";
223
+ rating: number;
224
+ lower: number;
225
+ upper: number;
226
+ variance: number;
227
+ votes: number;
228
+ }
229
+ /** Competitive ranking based on a scored evaluation. */
230
+ export interface Rankings1 {
231
+ domain: string;
232
+ category: string;
233
+ rank: number;
234
+ published_at?: string | null;
235
+ variant?: Variant1 | null;
236
+ sources: Array<SourceLink>;
237
+ metric: "score";
238
+ score: number;
239
+ lower: number;
240
+ upper: number;
241
+ observations: number;
242
+ sessions: number | null;
243
+ }
244
+ /** Reasoning support and controls when known. */
245
+ export interface Reasoning {
246
+ supported: false;
247
+ }
248
+ /** Reasoning support and controls when known. */
249
+ export interface Reasoning1 {
250
+ supported: true;
251
+ effort?: Array<EffortEnum> | null;
252
+ default_effort?: DefaultEffort | null;
253
+ toggle?: boolean | null;
254
+ budget?: Budget | null;
255
+ description?: string | null;
256
+ }
257
+ /** Reasoning effort used by the evaluated variant. */
258
+ export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "default";
259
+ /** Reasoning execution mode used by the evaluated variant. */
260
+ export type ReasoningMode = "auto" | "thinking";
261
+ /** Databricks retirement and replacement information. */
262
+ export interface Retirement {
263
+ schedules: Array<Schedule>;
264
+ replacement?: string | null;
265
+ replacement_name?: string | null;
266
+ }
267
+ /** Retirement dates for one serving offering. */
268
+ export interface Schedule {
269
+ offering: string;
270
+ dates: Array<string>;
271
+ }
272
+ /** Databricks serving mode available for the model. */
273
+ export type ServingMode = "pay_per_token" | "priority_pay_per_token" | "provisioned_throughput" | "batch";
274
+ /** Openable attribution for published catalog data. */
275
+ export interface SourceLink {
276
+ label: string;
277
+ url: string;
278
+ }
279
+ /** Current normalized lifecycle state. */
280
+ export type Status = "active" | "preview" | "alpha" | "beta" | "legacy" | "deprecated" | "retired";
281
+ /** Lifecycle state for this cloud-provider deployment. */
282
+ export type Status1 = "active" | "preview" | "alpha" | "beta" | "legacy" | "deprecated" | "retired";
283
+ export interface StreamModelsRequest {
284
+ action: "stream_models";
285
+ payload: CatalogFilters;
286
+ }
287
+ export interface StreamModelsResponse {
288
+ action: "model";
289
+ payload: CatalogModelRecord;
290
+ }
291
+ /** Normalized model type. */
292
+ export type Type = "chat" | "image" | "video" | "embedding" | "reranking" | "decision" | "transcription" | "speech" | "realtime" | "extraction" | "audio";
293
+ /** Quantity to which the rates apply. */
294
+ export type Unit = "per_million_tokens" | "per_hour" | "per_hour_per_50_model_units";
295
+ /** One validation failure, shaped like RFC 9457's validation example. */
296
+ export interface ValidationFailure {
297
+ /** The JSON Schema keyword that failed, or custom. */
298
+ keyword: string;
299
+ /** A JSON Pointer to the failing value in the frame; for required, the object lacking the member. */
300
+ pointer: string;
301
+ /** A human-readable message. */
302
+ detail: string;
303
+ /** For required only: the missing member. */
304
+ property?: string | number;
305
+ }
306
+ /** Evaluated model variant when it differs from the base model. */
307
+ export interface Variant {
308
+ reasoning?: boolean | null;
309
+ reasoning_effort?: ReasoningEffort | null;
310
+ reasoning_mode?: ReasoningMode | null;
311
+ harness?: string | null;
312
+ context?: number | null;
313
+ }
314
+ /** Evaluated model variant when it differs from the base model. */
315
+ export interface Variant1 {
316
+ reasoning?: boolean | null;
317
+ reasoning_effort?: ReasoningEffort | null;
318
+ reasoning_mode?: ReasoningMode | null;
319
+ harness?: string | null;
320
+ context?: number | null;
321
+ }
322
+ /** Evaluated model variant when it differs from the base model. */
323
+ export interface Variant2 {
324
+ reasoning?: boolean | null;
325
+ reasoning_effort?: ReasoningEffort | null;
326
+ reasoning_mode?: ReasoningMode | null;
327
+ harness?: string | null;
328
+ context?: number | null;
329
+ }
@@ -0,0 +1,7 @@
1
+ import type { CatalogClient } from "./types.js";
2
+ export type * from "./_generated/schemas.js";
3
+ export type * from "./types.js";
4
+ export interface CatalogClientOptions {
5
+ baseUrl: string;
6
+ }
7
+ export declare function createCatalogClient(options: CatalogClientOptions): CatalogClient;