@memnexus-ai/typescript-sdk 1.43.0 → 1.44.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.cjs +109 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2101,6 +2101,13 @@ var MemoriesService = class extends BaseService {
|
|
|
2101
2101
|
* @param temporalMode - Temporal query mode
|
|
2102
2102
|
* @param sortBy - Field to sort results by
|
|
2103
2103
|
* @param order - Sort order
|
|
2104
|
+
* @param expandEntities - Enable entity graph traversal branch in hybrid search
|
|
2105
|
+
* @param expandTopics - Enable topic graph traversal branch in hybrid search
|
|
2106
|
+
* @param expandFacts - Enable fact graph traversal branch in hybrid search
|
|
2107
|
+
* @param includeSuperseded - Include superseded and contradicted memories in results
|
|
2108
|
+
* @param entityWeight - Weight for entity graph branch in hybrid search
|
|
2109
|
+
* @param topicWeight - Weight for topic graph branch in hybrid search
|
|
2110
|
+
* @param factWeight - Weight for fact graph branch in hybrid search
|
|
2104
2111
|
*/
|
|
2105
2112
|
async searchMemoriesGet(options) {
|
|
2106
2113
|
const request = new Request({
|
|
@@ -2416,6 +2423,90 @@ var MemoriesService = class extends BaseService {
|
|
|
2416
2423
|
isCursor: false
|
|
2417
2424
|
});
|
|
2418
2425
|
}
|
|
2426
|
+
if (options?.expandEntities !== void 0) {
|
|
2427
|
+
request.addQueryParam("expandEntities", {
|
|
2428
|
+
key: "expandEntities",
|
|
2429
|
+
value: options.expandEntities,
|
|
2430
|
+
explode: false,
|
|
2431
|
+
encode: true,
|
|
2432
|
+
style: "form",
|
|
2433
|
+
isLimit: false,
|
|
2434
|
+
isOffset: false,
|
|
2435
|
+
isCursor: false
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
if (options?.expandTopics !== void 0) {
|
|
2439
|
+
request.addQueryParam("expandTopics", {
|
|
2440
|
+
key: "expandTopics",
|
|
2441
|
+
value: options.expandTopics,
|
|
2442
|
+
explode: false,
|
|
2443
|
+
encode: true,
|
|
2444
|
+
style: "form",
|
|
2445
|
+
isLimit: false,
|
|
2446
|
+
isOffset: false,
|
|
2447
|
+
isCursor: false
|
|
2448
|
+
});
|
|
2449
|
+
}
|
|
2450
|
+
if (options?.expandFacts !== void 0) {
|
|
2451
|
+
request.addQueryParam("expandFacts", {
|
|
2452
|
+
key: "expandFacts",
|
|
2453
|
+
value: options.expandFacts,
|
|
2454
|
+
explode: false,
|
|
2455
|
+
encode: true,
|
|
2456
|
+
style: "form",
|
|
2457
|
+
isLimit: false,
|
|
2458
|
+
isOffset: false,
|
|
2459
|
+
isCursor: false
|
|
2460
|
+
});
|
|
2461
|
+
}
|
|
2462
|
+
if (options?.includeSuperseded !== void 0) {
|
|
2463
|
+
request.addQueryParam("includeSuperseded", {
|
|
2464
|
+
key: "includeSuperseded",
|
|
2465
|
+
value: options.includeSuperseded,
|
|
2466
|
+
explode: false,
|
|
2467
|
+
encode: true,
|
|
2468
|
+
style: "form",
|
|
2469
|
+
isLimit: false,
|
|
2470
|
+
isOffset: false,
|
|
2471
|
+
isCursor: false
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
if (options?.entityWeight !== void 0) {
|
|
2475
|
+
request.addQueryParam("entityWeight", {
|
|
2476
|
+
key: "entityWeight",
|
|
2477
|
+
value: options.entityWeight,
|
|
2478
|
+
explode: false,
|
|
2479
|
+
encode: true,
|
|
2480
|
+
style: "form",
|
|
2481
|
+
isLimit: false,
|
|
2482
|
+
isOffset: false,
|
|
2483
|
+
isCursor: false
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
if (options?.topicWeight !== void 0) {
|
|
2487
|
+
request.addQueryParam("topicWeight", {
|
|
2488
|
+
key: "topicWeight",
|
|
2489
|
+
value: options.topicWeight,
|
|
2490
|
+
explode: false,
|
|
2491
|
+
encode: true,
|
|
2492
|
+
style: "form",
|
|
2493
|
+
isLimit: false,
|
|
2494
|
+
isOffset: false,
|
|
2495
|
+
isCursor: false
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
if (options?.factWeight !== void 0) {
|
|
2499
|
+
request.addQueryParam("factWeight", {
|
|
2500
|
+
key: "factWeight",
|
|
2501
|
+
value: options.factWeight,
|
|
2502
|
+
explode: false,
|
|
2503
|
+
encode: true,
|
|
2504
|
+
style: "form",
|
|
2505
|
+
isLimit: false,
|
|
2506
|
+
isOffset: false,
|
|
2507
|
+
isCursor: false
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2419
2510
|
return this.client.call(request);
|
|
2420
2511
|
}
|
|
2421
2512
|
/**
|
|
@@ -5025,6 +5116,20 @@ var searchRequest = import_zod.z.object({
|
|
|
5025
5116
|
includeFacts: import_zod.z.boolean().optional(),
|
|
5026
5117
|
/** Filter entities by type (e.g., PERSON, TECHNOLOGY, PROJECT) */
|
|
5027
5118
|
entityTypes: import_zod.z.array(import_zod.z.string().max(50)).max(20).optional(),
|
|
5119
|
+
/** Enable entity graph traversal branch in hybrid search (default false) */
|
|
5120
|
+
expandEntities: import_zod.z.boolean().optional(),
|
|
5121
|
+
/** Enable topic graph traversal branch in hybrid search (default false) */
|
|
5122
|
+
expandTopics: import_zod.z.boolean().optional(),
|
|
5123
|
+
/** Enable fact graph traversal branch in hybrid search (default false) */
|
|
5124
|
+
expandFacts: import_zod.z.boolean().optional(),
|
|
5125
|
+
/** Include superseded and contradicted memories in results (default false) */
|
|
5126
|
+
includeSuperseded: import_zod.z.boolean().optional(),
|
|
5127
|
+
/** Weight for entity graph branch in hybrid search (0-1, default 0.7) */
|
|
5128
|
+
entityWeight: import_zod.z.number().min(0).max(1).optional(),
|
|
5129
|
+
/** Weight for topic graph branch in hybrid search (0-1, default 0.5) */
|
|
5130
|
+
topicWeight: import_zod.z.number().min(0).max(1).optional(),
|
|
5131
|
+
/** Weight for fact graph branch in hybrid search (0-1, default 0.6) */
|
|
5132
|
+
factWeight: import_zod.z.number().min(0).max(1).optional(),
|
|
5028
5133
|
/** Field to sort results by (defaults to 'relevance' for search, 'createdAt' for list) */
|
|
5029
5134
|
sortBy: import_zod.z.enum(["relevance", "createdAt", "updatedAt", "eventTime"]).optional(),
|
|
5030
5135
|
/** Sort order: 'asc' or 'desc' (defaults to 'desc' for timestamps, 'desc' for relevance) */
|
|
@@ -5131,6 +5236,10 @@ var searchResult = import_zod.z.lazy(() => import_zod.z.object({
|
|
|
5131
5236
|
fulltextScore: import_zod.z.number().optional(),
|
|
5132
5237
|
/** Rank in fulltext search results */
|
|
5133
5238
|
fulltextRank: import_zod.z.number().nullable().optional(),
|
|
5239
|
+
/** Search branches that contributed to this result (e.g. ['semantic', 'entity']) */
|
|
5240
|
+
matchedVia: import_zod.z.array(import_zod.z.string()).optional(),
|
|
5241
|
+
/** Per-branch RRF scores for this result */
|
|
5242
|
+
branchScores: import_zod.z.object({}).catchall(import_zod.z.number()).optional(),
|
|
5134
5243
|
/** Detailed explanation of the match (only when explain=true) */
|
|
5135
5244
|
explanation: import_zod.z.object({
|
|
5136
5245
|
/** Human-readable explanation of why this result matched */
|