@ontos-ai/knowhere-sdk 2.4.1 → 2.4.2

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.mts CHANGED
@@ -199,14 +199,23 @@ interface Manifest {
199
199
  interface ConnectTo {
200
200
  /** Target chunk_id */
201
201
  target: string;
202
- /** Relationship type */
203
- relation: 'embeds' | 'related';
202
+ /**
203
+ * Relationship type.
204
+ * - `embeds`: body chunk -> inline image/table asset
205
+ * - `embedded_by`: image/table asset -> owning body chunk (reverse of `embeds`)
206
+ * - `related`: same-page body chunk -> asset
207
+ * - `cross_doc_entity` / `intra_doc_ref`: reserved, not produced yet
208
+ */
209
+ relation: 'embeds' | 'embedded_by' | 'related' | 'cross_doc_entity' | 'intra_doc_ref';
210
+ /** Reserved for cross-document targets; omitted for same-document edges */
211
+ targetDocumentId?: string;
204
212
  /** Placeholder ref in content, e.g. '[images/a.png]' (embeds only) */
205
213
  ref?: string;
206
- /** Semantic similarity score (related only) */
207
- score?: number;
208
- /** Shared keywords (related only) */
209
- keywords?: string[];
214
+ /** Character offsets of `ref` in the body content (embeds only) */
215
+ position?: {
216
+ start: number;
217
+ end: number;
218
+ };
210
219
  }
211
220
  /**
212
221
  * A single image or table resource entry in ``doc_nav.json``.
package/dist/index.d.ts CHANGED
@@ -199,14 +199,23 @@ interface Manifest {
199
199
  interface ConnectTo {
200
200
  /** Target chunk_id */
201
201
  target: string;
202
- /** Relationship type */
203
- relation: 'embeds' | 'related';
202
+ /**
203
+ * Relationship type.
204
+ * - `embeds`: body chunk -> inline image/table asset
205
+ * - `embedded_by`: image/table asset -> owning body chunk (reverse of `embeds`)
206
+ * - `related`: same-page body chunk -> asset
207
+ * - `cross_doc_entity` / `intra_doc_ref`: reserved, not produced yet
208
+ */
209
+ relation: 'embeds' | 'embedded_by' | 'related' | 'cross_doc_entity' | 'intra_doc_ref';
210
+ /** Reserved for cross-document targets; omitted for same-document edges */
211
+ targetDocumentId?: string;
204
212
  /** Placeholder ref in content, e.g. '[images/a.png]' (embeds only) */
205
213
  ref?: string;
206
- /** Semantic similarity score (related only) */
207
- score?: number;
208
- /** Shared keywords (related only) */
209
- keywords?: string[];
214
+ /** Character offsets of `ref` in the body content (embeds only) */
215
+ position?: {
216
+ start: number;
217
+ end: number;
218
+ };
210
219
  }
211
220
  /**
212
221
  * A single image or table resource entry in ``doc_nav.json``.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ontos-ai/knowhere-sdk",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Official Node.js SDK for Knowhere document parsing API",
5
5
  "keywords": [
6
6
  "knowhere",