@babav/knowledge-core-client 0.40.0 → 0.41.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
@@ -211,7 +211,6 @@ export interface Corpus {
211
211
  name: string;
212
212
  description: string | null;
213
213
  custom_metadata: Record<string, unknown>;
214
- profile_id: UUID | null;
215
214
  }
216
215
  /** Build-time knob bundle that DEFINES an index. Defaults are today's blessed config, so a
217
216
  * profile created with no params is the blessed profile. Change any knob => different vectors
@@ -715,7 +714,6 @@ export declare class KnowledgeCoreClient extends HttpBase {
715
714
  name: string;
716
715
  description?: string;
717
716
  custom_metadata?: Record<string, unknown>;
718
- profile_id?: UUID;
719
717
  }) => Promise<Corpus>;
720
718
  list: (q?: {
721
719
  limit?: number;
@@ -729,13 +727,11 @@ export declare class KnowledgeCoreClient extends HttpBase {
729
727
  cursor?: string;
730
728
  }) => Promise<Page<Corpus>>;
731
729
  get: (id: UUID) => Promise<Corpus>;
732
- /** `custom_metadata` merges (provided keys upsert, a null value deletes a key). `profile_id`
733
- * reassigns the ingestion profile (does NOT re-index; applies on next (re)ingest). */
730
+ /** `custom_metadata` merges (provided keys upsert, a null value deletes a key). */
734
731
  update: (id: UUID, b: {
735
732
  name?: string;
736
733
  description?: string;
737
734
  custom_metadata?: Record<string, unknown>;
738
- profile_id?: UUID | null;
739
735
  }) => Promise<Corpus>;
740
736
  delete: (id: UUID, confirmName: string) => Promise<void>;
741
737
  listFolders: (id: UUID) => Promise<Folder[]>;
@@ -985,9 +981,11 @@ export declare class KnowledgeCoreClient extends HttpBase {
985
981
  * capabilities (`supports_reasoning`), and mode↔model dependencies. */
986
982
  modelOptions: () => Promise<ModelOptions>;
987
983
  };
988
- /** Ingestion profiles — the build-side config object (counterpart to `agents`). A profile
989
- * DEFINES an index (chunking + embedding + sparse + quant); its `fingerprint` is the physical
990
- * collection identity. Attach one to a corpus via `corpora.create/update({ profile_id })`. */
984
+ /** Ingestion profiles — the build-side config object (counterpart to `agents`): a tenant-owned,
985
+ * named bundle of pipeline config (chunking + embedding + sparse + quant). Unlike an agent
986
+ * (chosen per query), a profile binds at the TENANT/COLLECTION level the tenant's one
987
+ * `is_default` profile governs how ALL its documents are ingested; swapping it re-indexes.
988
+ * A corpus's content is a RESULT of ingestion, so a corpus never selects a profile. */
991
989
  profiles: {
992
990
  /** List this tenant's ingestion profiles. */
993
991
  list: (q?: {
package/dist/index.js CHANGED
@@ -268,8 +268,7 @@ export class KnowledgeCoreClient extends HttpBase {
268
268
  /** Filter corpora by custom_metadata using the same metadata filter as documents. */
269
269
  search: (b) => this.request("POST", "/v1/corpora/search", { json: b }),
270
270
  get: (id) => this.request("GET", `/v1/corpora/${id}`),
271
- /** `custom_metadata` merges (provided keys upsert, a null value deletes a key). `profile_id`
272
- * reassigns the ingestion profile (does NOT re-index; applies on next (re)ingest). */
271
+ /** `custom_metadata` merges (provided keys upsert, a null value deletes a key). */
273
272
  update: (id, b) => this.request("PATCH", `/v1/corpora/${id}`, { json: b }),
274
273
  delete: (id, confirmName) => this.request("DELETE", `/v1/corpora/${id}`, { query: { confirm: confirmName } }),
275
274
  listFolders: (id) => this.pageAll(`/v1/corpora/${id}/folders`),
@@ -468,9 +467,11 @@ export class KnowledgeCoreClient extends HttpBase {
468
467
  * capabilities (`supports_reasoning`), and mode↔model dependencies. */
469
468
  modelOptions: () => this.request("GET", "/v1/agents/model-options"),
470
469
  };
471
- /** Ingestion profiles — the build-side config object (counterpart to `agents`). A profile
472
- * DEFINES an index (chunking + embedding + sparse + quant); its `fingerprint` is the physical
473
- * collection identity. Attach one to a corpus via `corpora.create/update({ profile_id })`. */
470
+ /** Ingestion profiles — the build-side config object (counterpart to `agents`): a tenant-owned,
471
+ * named bundle of pipeline config (chunking + embedding + sparse + quant). Unlike an agent
472
+ * (chosen per query), a profile binds at the TENANT/COLLECTION level the tenant's one
473
+ * `is_default` profile governs how ALL its documents are ingested; swapping it re-indexes.
474
+ * A corpus's content is a RESULT of ingestion, so a corpus never selects a profile. */
474
475
  profiles = {
475
476
  /** List this tenant's ingestion profiles. */
476
477
  list: (q) => this.request("GET", "/v1/profiles", { query: q }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babav/knowledge-core-client",
3
- "version": "0.40.0",
3
+ "version": "0.41.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
@@ -244,7 +244,7 @@ export interface Corpus {
244
244
  name: string;
245
245
  description: string | null;
246
246
  custom_metadata: Record<string, unknown>;
247
- profile_id: UUID | null; // ingestion profile the corpus is indexed under (null => tenant's blessed default)
247
+ // NB: the ingestion profile is TENANT-level (governs the whole collection), never per-corpus.
248
248
  }
249
249
 
250
250
  /** Build-time knob bundle that DEFINES an index. Defaults are today's blessed config, so a
@@ -856,7 +856,7 @@ export class KnowledgeCoreClient extends HttpBase {
856
856
 
857
857
  // --- corpora ---
858
858
  corpora = {
859
- create: (b: { name: string; description?: string; custom_metadata?: Record<string, unknown>; profile_id?: UUID }) =>
859
+ create: (b: { name: string; description?: string; custom_metadata?: Record<string, unknown> }) =>
860
860
  this.request<Corpus>("POST", "/v1/corpora", { json: b }),
861
861
  list: (q?: { limit?: number; cursor?: string }) => this.request<Page<Corpus>>("GET", "/v1/corpora", { query: q }),
862
862
  listAll: () => this.pageAll<Corpus>("/v1/corpora"),
@@ -864,9 +864,8 @@ export class KnowledgeCoreClient extends HttpBase {
864
864
  search: (b: { filter?: MetadataFilter; limit?: number; cursor?: string }) =>
865
865
  this.request<Page<Corpus>>("POST", "/v1/corpora/search", { json: b }),
866
866
  get: (id: UUID) => this.request<Corpus>("GET", `/v1/corpora/${id}`),
867
- /** `custom_metadata` merges (provided keys upsert, a null value deletes a key). `profile_id`
868
- * reassigns the ingestion profile (does NOT re-index; applies on next (re)ingest). */
869
- update: (id: UUID, b: { name?: string; description?: string; custom_metadata?: Record<string, unknown>; profile_id?: UUID | null }) =>
867
+ /** `custom_metadata` merges (provided keys upsert, a null value deletes a key). */
868
+ update: (id: UUID, b: { name?: string; description?: string; custom_metadata?: Record<string, unknown> }) =>
870
869
  this.request<Corpus>("PATCH", `/v1/corpora/${id}`, { json: b }),
871
870
  delete: (id: UUID, confirmName: string) => this.request<void>("DELETE", `/v1/corpora/${id}`, { query: { confirm: confirmName } }),
872
871
  listFolders: (id: UUID) => this.pageAll<Folder>(`/v1/corpora/${id}/folders`),
@@ -1130,9 +1129,11 @@ export class KnowledgeCoreClient extends HttpBase {
1130
1129
  modelOptions: () => this.request<ModelOptions>("GET", "/v1/agents/model-options"),
1131
1130
  };
1132
1131
 
1133
- /** Ingestion profiles — the build-side config object (counterpart to `agents`). A profile
1134
- * DEFINES an index (chunking + embedding + sparse + quant); its `fingerprint` is the physical
1135
- * collection identity. Attach one to a corpus via `corpora.create/update({ profile_id })`. */
1132
+ /** Ingestion profiles — the build-side config object (counterpart to `agents`): a tenant-owned,
1133
+ * named bundle of pipeline config (chunking + embedding + sparse + quant). Unlike an agent
1134
+ * (chosen per query), a profile binds at the TENANT/COLLECTION level the tenant's one
1135
+ * `is_default` profile governs how ALL its documents are ingested; swapping it re-indexes.
1136
+ * A corpus's content is a RESULT of ingestion, so a corpus never selects a profile. */
1136
1137
  profiles = {
1137
1138
  /** List this tenant's ingestion profiles. */
1138
1139
  list: (q?: { limit?: number; cursor?: string }) =>