@babav/knowledge-core-client 0.41.0 → 0.42.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/dist/index.d.ts CHANGED
@@ -245,6 +245,27 @@ export interface IngestionProfileWrite {
245
245
  params?: Partial<IngestionProfileParams>;
246
246
  is_default?: boolean;
247
247
  }
248
+ /** Config catalog for a profile UI (GET /v1/profiles/model-options) — build-side mirror of the
249
+ * query model-options. `embedding_models` maps id → { provider, dimensions, label }; `fields`
250
+ * gives each param its supported list / default / bounds; `standard_params` is the blessed default. */
251
+ export interface IngestionProfileOptions {
252
+ embedding_models: Record<string, {
253
+ provider: string;
254
+ dimensions: number;
255
+ label: string;
256
+ }>;
257
+ chunkers: Record<string, {
258
+ label: string;
259
+ }>;
260
+ distances: string[];
261
+ quantizations: string[];
262
+ fields: Record<string, {
263
+ supported?: string[];
264
+ default?: unknown;
265
+ min?: number;
266
+ }>;
267
+ standard_params: IngestionProfileParams;
268
+ }
248
269
  export interface Folder {
249
270
  id: UUID;
250
271
  corpus_id: UUID;
@@ -999,8 +1020,12 @@ export declare class KnowledgeCoreClient extends HttpBase {
999
1020
  name: string;
1000
1021
  }) => Promise<IngestionProfile>;
1001
1022
  update: (id: UUID, b: IngestionProfileWrite) => Promise<IngestionProfile>;
1002
- /** Delete a profile. 409 if any corpus still references it. */
1023
+ /** Delete a profile. 409 when it's the tenant's active (default) profile. */
1003
1024
  delete: (id: UUID) => Promise<void>;
1025
+ /** The config catalog for a profile UI: supported embedding models (+ provider/dims),
1026
+ * chunkers, distances, quantizations, per-field defaults/bounds, and the standard params.
1027
+ * Build-side mirror of `agents.modelOptions()`. */
1028
+ modelOptions: () => Promise<IngestionProfileOptions>;
1004
1029
  };
1005
1030
  analytics: {
1006
1031
  /** Query-volume time series for a corpus (the denominator for everything). */
package/dist/index.js CHANGED
@@ -480,8 +480,12 @@ export class KnowledgeCoreClient extends HttpBase {
480
480
  /** Create a profile owned by this tenant. Omit `params` for the blessed profile (all defaults). */
481
481
  create: (b) => this.request("POST", "/v1/profiles", { json: b }),
482
482
  update: (id, b) => this.request("PATCH", `/v1/profiles/${id}`, { json: b }),
483
- /** Delete a profile. 409 if any corpus still references it. */
483
+ /** Delete a profile. 409 when it's the tenant's active (default) profile. */
484
484
  delete: (id) => this.request("DELETE", `/v1/profiles/${id}`),
485
+ /** The config catalog for a profile UI: supported embedding models (+ provider/dims),
486
+ * chunkers, distances, quantizations, per-field defaults/bounds, and the standard params.
487
+ * Build-side mirror of `agents.modelOptions()`. */
488
+ modelOptions: () => this.request("GET", "/v1/profiles/model-options"),
485
489
  };
486
490
  // --- retrieval analytics (read-only, tenant-scoped, aggregate-on-read) ---
487
491
  analytics = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babav/knowledge-core-client",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "TypeScript client for the Babav Knowledge Core API (Deno + Node 18+, zero deps). Includes the babav.visual grammar TYPES at the ./visual subpath (types only; all visual rendering is server-side).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -282,6 +282,18 @@ export interface IngestionProfileWrite {
282
282
  params?: Partial<IngestionProfileParams>;
283
283
  is_default?: boolean;
284
284
  }
285
+
286
+ /** Config catalog for a profile UI (GET /v1/profiles/model-options) — build-side mirror of the
287
+ * query model-options. `embedding_models` maps id → { provider, dimensions, label }; `fields`
288
+ * gives each param its supported list / default / bounds; `standard_params` is the blessed default. */
289
+ export interface IngestionProfileOptions {
290
+ embedding_models: Record<string, { provider: string; dimensions: number; label: string }>;
291
+ chunkers: Record<string, { label: string }>;
292
+ distances: string[];
293
+ quantizations: string[];
294
+ fields: Record<string, { supported?: string[]; default?: unknown; min?: number }>;
295
+ standard_params: IngestionProfileParams;
296
+ }
285
297
  export interface Folder {
286
298
  id: UUID;
287
299
  corpus_id: UUID;
@@ -1145,8 +1157,12 @@ export class KnowledgeCoreClient extends HttpBase {
1145
1157
  this.request<IngestionProfile>("POST", "/v1/profiles", { json: b }),
1146
1158
  update: (id: UUID, b: IngestionProfileWrite) =>
1147
1159
  this.request<IngestionProfile>("PATCH", `/v1/profiles/${id}`, { json: b }),
1148
- /** Delete a profile. 409 if any corpus still references it. */
1160
+ /** Delete a profile. 409 when it's the tenant's active (default) profile. */
1149
1161
  delete: (id: UUID) => this.request<void>("DELETE", `/v1/profiles/${id}`),
1162
+ /** The config catalog for a profile UI: supported embedding models (+ provider/dims),
1163
+ * chunkers, distances, quantizations, per-field defaults/bounds, and the standard params.
1164
+ * Build-side mirror of `agents.modelOptions()`. */
1165
+ modelOptions: () => this.request<IngestionProfileOptions>("GET", "/v1/profiles/model-options"),
1150
1166
  };
1151
1167
 
1152
1168
  // --- retrieval analytics (read-only, tenant-scoped, aggregate-on-read) ---