@equationalapplications/core-llm-wiki 4.2.0 → 4.4.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.mts +23 -8
- package/dist/index.d.ts +23 -8
- package/dist/index.js +274 -126
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +274 -126
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -53,16 +53,17 @@ interface ReadOptions {
|
|
|
53
53
|
preFilterLimit?: number | null;
|
|
54
54
|
hybridWeight?: number;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* Per-entity score multiplier for multi-entity reads. Missing entries default to 1.0.
|
|
57
|
+
* Entities with weight 0 are skipped during scored retrieval unless
|
|
58
|
+
* `includeZeroWeightEntities` is true; in that case they rank below all finite scores.
|
|
59
|
+
* Only meaningful when `entityId` is an array; ignored for single-string calls.
|
|
59
60
|
*/
|
|
60
61
|
tierWeights?: Record<string, number>;
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* When true, entities with a tier weight of 0 are included in scored retrieval
|
|
64
|
+
* as bottom fillers (ranked below every finite-scored candidate).
|
|
65
|
+
* When false (default), zero-weight entities are skipped entirely.
|
|
66
|
+
* Only meaningful when `entityId` is an array; ignored for single-string calls.
|
|
66
67
|
*/
|
|
67
68
|
includeZeroWeightEntities?: boolean;
|
|
68
69
|
}
|
|
@@ -424,7 +425,12 @@ declare class WikiMemory {
|
|
|
424
425
|
tasks: number;
|
|
425
426
|
events: number;
|
|
426
427
|
}>;
|
|
427
|
-
read(entityId: string, query: string, options?: ReadOptions): Promise<MemoryBundle>;
|
|
428
|
+
read(entityId: string | string[], query: string, options?: ReadOptions): Promise<MemoryBundle>;
|
|
429
|
+
/**
|
|
430
|
+
* Returns entity IDs that will participate in scored retrieval.
|
|
431
|
+
* Excludes zero-weight entities unless includeZeroWeightEntities is true.
|
|
432
|
+
*/
|
|
433
|
+
private _filterScoredEntities;
|
|
428
434
|
/**
|
|
429
435
|
* Stable tie-break sort: score desc → access_count desc → updated_at desc → id asc.
|
|
430
436
|
*/
|
|
@@ -434,6 +440,15 @@ declare class WikiMemory {
|
|
|
434
440
|
* Negative return means "a ranks ahead of b" for descending score order.
|
|
435
441
|
*/
|
|
436
442
|
private _compareScoredRows;
|
|
443
|
+
/**
|
|
444
|
+
* Build SQL IN clause with placeholders for multiple entity IDs.
|
|
445
|
+
*/
|
|
446
|
+
private _entityInClause;
|
|
447
|
+
/**
|
|
448
|
+
* Hydrate full facts by ID. Pass scopedEntityIds to restrict to requested namespaces in SQL
|
|
449
|
+
* (defense-in-depth against a rogue VectorRanker returning cross-entity IDs).
|
|
450
|
+
*/
|
|
451
|
+
private _hydrateFactsByIds;
|
|
437
452
|
/**
|
|
438
453
|
* Strip potentially sensitive data from ranker errors before exposing to host callbacks.
|
|
439
454
|
* Preserves error type for debugging but removes message/stack that may contain credentials.
|
package/dist/index.d.ts
CHANGED
|
@@ -53,16 +53,17 @@ interface ReadOptions {
|
|
|
53
53
|
preFilterLimit?: number | null;
|
|
54
54
|
hybridWeight?: number;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* Per-entity score multiplier for multi-entity reads. Missing entries default to 1.0.
|
|
57
|
+
* Entities with weight 0 are skipped during scored retrieval unless
|
|
58
|
+
* `includeZeroWeightEntities` is true; in that case they rank below all finite scores.
|
|
59
|
+
* Only meaningful when `entityId` is an array; ignored for single-string calls.
|
|
59
60
|
*/
|
|
60
61
|
tierWeights?: Record<string, number>;
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* When true, entities with a tier weight of 0 are included in scored retrieval
|
|
64
|
+
* as bottom fillers (ranked below every finite-scored candidate).
|
|
65
|
+
* When false (default), zero-weight entities are skipped entirely.
|
|
66
|
+
* Only meaningful when `entityId` is an array; ignored for single-string calls.
|
|
66
67
|
*/
|
|
67
68
|
includeZeroWeightEntities?: boolean;
|
|
68
69
|
}
|
|
@@ -424,7 +425,12 @@ declare class WikiMemory {
|
|
|
424
425
|
tasks: number;
|
|
425
426
|
events: number;
|
|
426
427
|
}>;
|
|
427
|
-
read(entityId: string, query: string, options?: ReadOptions): Promise<MemoryBundle>;
|
|
428
|
+
read(entityId: string | string[], query: string, options?: ReadOptions): Promise<MemoryBundle>;
|
|
429
|
+
/**
|
|
430
|
+
* Returns entity IDs that will participate in scored retrieval.
|
|
431
|
+
* Excludes zero-weight entities unless includeZeroWeightEntities is true.
|
|
432
|
+
*/
|
|
433
|
+
private _filterScoredEntities;
|
|
428
434
|
/**
|
|
429
435
|
* Stable tie-break sort: score desc → access_count desc → updated_at desc → id asc.
|
|
430
436
|
*/
|
|
@@ -434,6 +440,15 @@ declare class WikiMemory {
|
|
|
434
440
|
* Negative return means "a ranks ahead of b" for descending score order.
|
|
435
441
|
*/
|
|
436
442
|
private _compareScoredRows;
|
|
443
|
+
/**
|
|
444
|
+
* Build SQL IN clause with placeholders for multiple entity IDs.
|
|
445
|
+
*/
|
|
446
|
+
private _entityInClause;
|
|
447
|
+
/**
|
|
448
|
+
* Hydrate full facts by ID. Pass scopedEntityIds to restrict to requested namespaces in SQL
|
|
449
|
+
* (defense-in-depth against a rogue VectorRanker returning cross-entity IDs).
|
|
450
|
+
*/
|
|
451
|
+
private _hydrateFactsByIds;
|
|
437
452
|
/**
|
|
438
453
|
* Strip potentially sensitive data from ranker errors before exposing to host callbacks.
|
|
439
454
|
* Preserves error type for debugging but removes message/stack that may contain credentials.
|