@memnexus-ai/typescript-sdk 1.10.1 → 1.11.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/README.md +4 -0
- package/dist/index.d.ts +225 -126
- package/dist/index.js +538 -356
- package/dist/index.mjs +531 -353
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,15 +49,19 @@ __export(src_exports, {
|
|
|
49
49
|
MemoryMemoryType2: () => MemoryMemoryType2,
|
|
50
50
|
MemoryMemoryType3: () => MemoryMemoryType3,
|
|
51
51
|
MemoryMemoryType4: () => MemoryMemoryType4,
|
|
52
|
-
Mode: () => Mode,
|
|
53
52
|
NoCache: () => NoCache,
|
|
54
53
|
PatternsService: () => PatternsService,
|
|
55
54
|
Role: () => Role,
|
|
56
|
-
|
|
55
|
+
SearchMemoriesGetMemoryType: () => SearchMemoriesGetMemoryType,
|
|
56
|
+
SearchMemoriesGetMode: () => SearchMemoriesGetMode,
|
|
57
|
+
SearchMemoriesGetSearchMethod: () => SearchMemoriesGetSearchMethod,
|
|
58
|
+
SearchMemoriesGetTemporalMode: () => SearchMemoriesGetTemporalMode,
|
|
57
59
|
SearchRequestMemoryType: () => SearchRequestMemoryType,
|
|
60
|
+
SearchRequestMode: () => SearchRequestMode,
|
|
61
|
+
SearchRequestSearchMethod: () => SearchRequestSearchMethod,
|
|
62
|
+
SearchRequestTemporalMode: () => SearchRequestTemporalMode,
|
|
58
63
|
ServiceCheckStatus: () => ServiceCheckStatus,
|
|
59
64
|
SystemService: () => SystemService,
|
|
60
|
-
TemporalMode: () => TemporalMode,
|
|
61
65
|
TopicsService: () => TopicsService,
|
|
62
66
|
UpdateMemoryRequestMemoryType: () => UpdateMemoryRequestMemoryType
|
|
63
67
|
});
|
|
@@ -4337,169 +4341,42 @@ var createMemoryResponseRequest = import_zod64.z.lazy(() => {
|
|
|
4337
4341
|
}));
|
|
4338
4342
|
});
|
|
4339
4343
|
|
|
4340
|
-
// src/services/memories/models/search-
|
|
4344
|
+
// src/services/memories/models/search-response.ts
|
|
4345
|
+
var import_zod74 = require("zod");
|
|
4346
|
+
|
|
4347
|
+
// src/services/memories/models/search-result.ts
|
|
4348
|
+
var import_zod69 = require("zod");
|
|
4349
|
+
|
|
4350
|
+
// src/services/memories/models/search-result-memory.ts
|
|
4341
4351
|
var import_zod65 = require("zod");
|
|
4342
|
-
var
|
|
4352
|
+
var searchResultMemory = import_zod65.z.lazy(() => {
|
|
4343
4353
|
return import_zod65.z.object({
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
offset: import_zod65.z.number().gte(0).optional(),
|
|
4349
|
-
vectorWeight: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4350
|
-
fulltextWeight: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4351
|
-
threshold: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4352
|
-
explain: import_zod65.z.boolean().optional(),
|
|
4353
|
-
asOfTime: import_zod65.z.string().optional(),
|
|
4354
|
-
validAtTime: import_zod65.z.string().optional(),
|
|
4355
|
-
eventTimeFrom: import_zod65.z.string().optional(),
|
|
4356
|
-
eventTimeTo: import_zod65.z.string().optional(),
|
|
4357
|
-
ingestionTimeFrom: import_zod65.z.string().optional(),
|
|
4358
|
-
ingestionTimeTo: import_zod65.z.string().optional(),
|
|
4359
|
-
includeExpired: import_zod65.z.boolean().optional(),
|
|
4360
|
-
temporalMode: import_zod65.z.string().optional(),
|
|
4354
|
+
id: import_zod65.z.string(),
|
|
4355
|
+
content: import_zod65.z.string(),
|
|
4356
|
+
memoryType: import_zod65.z.string(),
|
|
4357
|
+
context: import_zod65.z.string().optional(),
|
|
4361
4358
|
topics: import_zod65.z.array(import_zod65.z.string()).optional(),
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4359
|
+
timestamp: import_zod65.z.string().optional(),
|
|
4360
|
+
eventTime: import_zod65.z.string().optional(),
|
|
4361
|
+
validFrom: import_zod65.z.string().optional(),
|
|
4362
|
+
validTo: import_zod65.z.string().optional().nullable(),
|
|
4363
|
+
createdAt: import_zod65.z.string(),
|
|
4364
|
+
updatedAt: import_zod65.z.string()
|
|
4366
4365
|
});
|
|
4367
4366
|
});
|
|
4368
|
-
var
|
|
4369
|
-
return import_zod65.z.object({
|
|
4370
|
-
query: import_zod65.z.string().min(1),
|
|
4371
|
-
mode: import_zod65.z.string().optional(),
|
|
4372
|
-
searchMethod: import_zod65.z.string().optional(),
|
|
4373
|
-
limit: import_zod65.z.number().gte(1).lte(100).optional(),
|
|
4374
|
-
offset: import_zod65.z.number().gte(0).optional(),
|
|
4375
|
-
vectorWeight: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4376
|
-
fulltextWeight: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4377
|
-
threshold: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4378
|
-
explain: import_zod65.z.boolean().optional(),
|
|
4379
|
-
asOfTime: import_zod65.z.string().optional(),
|
|
4380
|
-
validAtTime: import_zod65.z.string().optional(),
|
|
4381
|
-
eventTimeFrom: import_zod65.z.string().optional(),
|
|
4382
|
-
eventTimeTo: import_zod65.z.string().optional(),
|
|
4383
|
-
ingestionTimeFrom: import_zod65.z.string().optional(),
|
|
4384
|
-
ingestionTimeTo: import_zod65.z.string().optional(),
|
|
4385
|
-
includeExpired: import_zod65.z.boolean().optional(),
|
|
4386
|
-
temporalMode: import_zod65.z.string().optional(),
|
|
4387
|
-
topics: import_zod65.z.array(import_zod65.z.string()).optional(),
|
|
4388
|
-
memoryType: import_zod65.z.string().optional(),
|
|
4389
|
-
conversationId: import_zod65.z.string().optional(),
|
|
4390
|
-
includeTopics: import_zod65.z.boolean().optional(),
|
|
4391
|
-
includeEntities: import_zod65.z.boolean().optional()
|
|
4392
|
-
}).transform((data) => ({
|
|
4393
|
-
query: data["query"],
|
|
4394
|
-
mode: data["mode"],
|
|
4395
|
-
searchMethod: data["searchMethod"],
|
|
4396
|
-
limit: data["limit"],
|
|
4397
|
-
offset: data["offset"],
|
|
4398
|
-
vectorWeight: data["vectorWeight"],
|
|
4399
|
-
fulltextWeight: data["fulltextWeight"],
|
|
4400
|
-
threshold: data["threshold"],
|
|
4401
|
-
explain: data["explain"],
|
|
4402
|
-
asOfTime: data["asOfTime"],
|
|
4403
|
-
validAtTime: data["validAtTime"],
|
|
4404
|
-
eventTimeFrom: data["eventTimeFrom"],
|
|
4405
|
-
eventTimeTo: data["eventTimeTo"],
|
|
4406
|
-
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4407
|
-
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4408
|
-
includeExpired: data["includeExpired"],
|
|
4409
|
-
temporalMode: data["temporalMode"],
|
|
4410
|
-
topics: data["topics"],
|
|
4411
|
-
memoryType: data["memoryType"],
|
|
4412
|
-
conversationId: data["conversationId"],
|
|
4413
|
-
includeTopics: data["includeTopics"],
|
|
4414
|
-
includeEntities: data["includeEntities"]
|
|
4415
|
-
}));
|
|
4416
|
-
});
|
|
4417
|
-
var searchRequestRequest = import_zod65.z.lazy(() => {
|
|
4367
|
+
var searchResultMemoryResponse = import_zod65.z.lazy(() => {
|
|
4418
4368
|
return import_zod65.z.object({
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
offset: import_zod65.z.number().gte(0).optional(),
|
|
4424
|
-
vectorWeight: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4425
|
-
fulltextWeight: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4426
|
-
threshold: import_zod65.z.number().gte(0).lte(1).optional(),
|
|
4427
|
-
explain: import_zod65.z.boolean().optional(),
|
|
4428
|
-
asOfTime: import_zod65.z.string().optional(),
|
|
4429
|
-
validAtTime: import_zod65.z.string().optional(),
|
|
4430
|
-
eventTimeFrom: import_zod65.z.string().optional(),
|
|
4431
|
-
eventTimeTo: import_zod65.z.string().optional(),
|
|
4432
|
-
ingestionTimeFrom: import_zod65.z.string().optional(),
|
|
4433
|
-
ingestionTimeTo: import_zod65.z.string().optional(),
|
|
4434
|
-
includeExpired: import_zod65.z.boolean().optional(),
|
|
4435
|
-
temporalMode: import_zod65.z.string().optional(),
|
|
4369
|
+
id: import_zod65.z.string(),
|
|
4370
|
+
content: import_zod65.z.string(),
|
|
4371
|
+
memoryType: import_zod65.z.string(),
|
|
4372
|
+
context: import_zod65.z.string().optional(),
|
|
4436
4373
|
topics: import_zod65.z.array(import_zod65.z.string()).optional(),
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
mode: data["mode"],
|
|
4444
|
-
searchMethod: data["searchMethod"],
|
|
4445
|
-
limit: data["limit"],
|
|
4446
|
-
offset: data["offset"],
|
|
4447
|
-
vectorWeight: data["vectorWeight"],
|
|
4448
|
-
fulltextWeight: data["fulltextWeight"],
|
|
4449
|
-
threshold: data["threshold"],
|
|
4450
|
-
explain: data["explain"],
|
|
4451
|
-
asOfTime: data["asOfTime"],
|
|
4452
|
-
validAtTime: data["validAtTime"],
|
|
4453
|
-
eventTimeFrom: data["eventTimeFrom"],
|
|
4454
|
-
eventTimeTo: data["eventTimeTo"],
|
|
4455
|
-
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4456
|
-
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4457
|
-
includeExpired: data["includeExpired"],
|
|
4458
|
-
temporalMode: data["temporalMode"],
|
|
4459
|
-
topics: data["topics"],
|
|
4460
|
-
memoryType: data["memoryType"],
|
|
4461
|
-
conversationId: data["conversationId"],
|
|
4462
|
-
includeTopics: data["includeTopics"],
|
|
4463
|
-
includeEntities: data["includeEntities"]
|
|
4464
|
-
}));
|
|
4465
|
-
});
|
|
4466
|
-
|
|
4467
|
-
// src/services/memories/models/search-response.ts
|
|
4468
|
-
var import_zod75 = require("zod");
|
|
4469
|
-
|
|
4470
|
-
// src/services/memories/models/search-result.ts
|
|
4471
|
-
var import_zod70 = require("zod");
|
|
4472
|
-
|
|
4473
|
-
// src/services/memories/models/search-result-memory.ts
|
|
4474
|
-
var import_zod66 = require("zod");
|
|
4475
|
-
var searchResultMemory = import_zod66.z.lazy(() => {
|
|
4476
|
-
return import_zod66.z.object({
|
|
4477
|
-
id: import_zod66.z.string(),
|
|
4478
|
-
content: import_zod66.z.string(),
|
|
4479
|
-
memoryType: import_zod66.z.string(),
|
|
4480
|
-
context: import_zod66.z.string().optional(),
|
|
4481
|
-
topics: import_zod66.z.array(import_zod66.z.string()).optional(),
|
|
4482
|
-
timestamp: import_zod66.z.string().optional(),
|
|
4483
|
-
eventTime: import_zod66.z.string().optional(),
|
|
4484
|
-
validFrom: import_zod66.z.string().optional(),
|
|
4485
|
-
validTo: import_zod66.z.string().optional().nullable(),
|
|
4486
|
-
createdAt: import_zod66.z.string(),
|
|
4487
|
-
updatedAt: import_zod66.z.string()
|
|
4488
|
-
});
|
|
4489
|
-
});
|
|
4490
|
-
var searchResultMemoryResponse = import_zod66.z.lazy(() => {
|
|
4491
|
-
return import_zod66.z.object({
|
|
4492
|
-
id: import_zod66.z.string(),
|
|
4493
|
-
content: import_zod66.z.string(),
|
|
4494
|
-
memoryType: import_zod66.z.string(),
|
|
4495
|
-
context: import_zod66.z.string().optional(),
|
|
4496
|
-
topics: import_zod66.z.array(import_zod66.z.string()).optional(),
|
|
4497
|
-
timestamp: import_zod66.z.string().optional(),
|
|
4498
|
-
eventTime: import_zod66.z.string().optional(),
|
|
4499
|
-
validFrom: import_zod66.z.string().optional(),
|
|
4500
|
-
validTo: import_zod66.z.string().optional().nullable(),
|
|
4501
|
-
createdAt: import_zod66.z.string(),
|
|
4502
|
-
updatedAt: import_zod66.z.string()
|
|
4374
|
+
timestamp: import_zod65.z.string().optional(),
|
|
4375
|
+
eventTime: import_zod65.z.string().optional(),
|
|
4376
|
+
validFrom: import_zod65.z.string().optional(),
|
|
4377
|
+
validTo: import_zod65.z.string().optional().nullable(),
|
|
4378
|
+
createdAt: import_zod65.z.string(),
|
|
4379
|
+
updatedAt: import_zod65.z.string()
|
|
4503
4380
|
}).transform((data) => ({
|
|
4504
4381
|
id: data["id"],
|
|
4505
4382
|
content: data["content"],
|
|
@@ -4514,19 +4391,19 @@ var searchResultMemoryResponse = import_zod66.z.lazy(() => {
|
|
|
4514
4391
|
updatedAt: data["updatedAt"]
|
|
4515
4392
|
}));
|
|
4516
4393
|
});
|
|
4517
|
-
var searchResultMemoryRequest =
|
|
4518
|
-
return
|
|
4519
|
-
id:
|
|
4520
|
-
content:
|
|
4521
|
-
memoryType:
|
|
4522
|
-
context:
|
|
4523
|
-
topics:
|
|
4524
|
-
timestamp:
|
|
4525
|
-
eventTime:
|
|
4526
|
-
validFrom:
|
|
4527
|
-
validTo:
|
|
4528
|
-
createdAt:
|
|
4529
|
-
updatedAt:
|
|
4394
|
+
var searchResultMemoryRequest = import_zod65.z.lazy(() => {
|
|
4395
|
+
return import_zod65.z.object({
|
|
4396
|
+
id: import_zod65.z.string(),
|
|
4397
|
+
content: import_zod65.z.string(),
|
|
4398
|
+
memoryType: import_zod65.z.string(),
|
|
4399
|
+
context: import_zod65.z.string().optional(),
|
|
4400
|
+
topics: import_zod65.z.array(import_zod65.z.string()).optional(),
|
|
4401
|
+
timestamp: import_zod65.z.string().optional(),
|
|
4402
|
+
eventTime: import_zod65.z.string().optional(),
|
|
4403
|
+
validFrom: import_zod65.z.string().optional(),
|
|
4404
|
+
validTo: import_zod65.z.string().optional().nullable(),
|
|
4405
|
+
createdAt: import_zod65.z.string(),
|
|
4406
|
+
updatedAt: import_zod65.z.string()
|
|
4530
4407
|
}).transform((data) => ({
|
|
4531
4408
|
id: data["id"],
|
|
4532
4409
|
content: data["content"],
|
|
@@ -4543,26 +4420,26 @@ var searchResultMemoryRequest = import_zod66.z.lazy(() => {
|
|
|
4543
4420
|
});
|
|
4544
4421
|
|
|
4545
4422
|
// src/services/memories/models/entity.ts
|
|
4546
|
-
var
|
|
4547
|
-
var entity =
|
|
4548
|
-
return
|
|
4549
|
-
name:
|
|
4550
|
-
type:
|
|
4423
|
+
var import_zod66 = require("zod");
|
|
4424
|
+
var entity = import_zod66.z.lazy(() => {
|
|
4425
|
+
return import_zod66.z.object({
|
|
4426
|
+
name: import_zod66.z.string().optional(),
|
|
4427
|
+
type: import_zod66.z.string().optional()
|
|
4551
4428
|
});
|
|
4552
4429
|
});
|
|
4553
|
-
var entityResponse =
|
|
4554
|
-
return
|
|
4555
|
-
name:
|
|
4556
|
-
type:
|
|
4430
|
+
var entityResponse = import_zod66.z.lazy(() => {
|
|
4431
|
+
return import_zod66.z.object({
|
|
4432
|
+
name: import_zod66.z.string().optional(),
|
|
4433
|
+
type: import_zod66.z.string().optional()
|
|
4557
4434
|
}).transform((data) => ({
|
|
4558
4435
|
name: data["name"],
|
|
4559
4436
|
type: data["type"]
|
|
4560
4437
|
}));
|
|
4561
4438
|
});
|
|
4562
|
-
var entityRequest =
|
|
4563
|
-
return
|
|
4564
|
-
name:
|
|
4565
|
-
type:
|
|
4439
|
+
var entityRequest = import_zod66.z.lazy(() => {
|
|
4440
|
+
return import_zod66.z.object({
|
|
4441
|
+
name: import_zod66.z.string().optional(),
|
|
4442
|
+
type: import_zod66.z.string().optional()
|
|
4566
4443
|
}).transform((data) => ({
|
|
4567
4444
|
name: data["name"],
|
|
4568
4445
|
type: data["type"]
|
|
@@ -4570,30 +4447,30 @@ var entityRequest = import_zod67.z.lazy(() => {
|
|
|
4570
4447
|
});
|
|
4571
4448
|
|
|
4572
4449
|
// src/services/memories/models/topic-reference.ts
|
|
4573
|
-
var
|
|
4574
|
-
var topicReference =
|
|
4575
|
-
return
|
|
4576
|
-
id:
|
|
4577
|
-
name:
|
|
4578
|
-
createdAt:
|
|
4450
|
+
var import_zod67 = require("zod");
|
|
4451
|
+
var topicReference = import_zod67.z.lazy(() => {
|
|
4452
|
+
return import_zod67.z.object({
|
|
4453
|
+
id: import_zod67.z.string(),
|
|
4454
|
+
name: import_zod67.z.string(),
|
|
4455
|
+
createdAt: import_zod67.z.string().optional()
|
|
4579
4456
|
});
|
|
4580
4457
|
});
|
|
4581
|
-
var topicReferenceResponse =
|
|
4582
|
-
return
|
|
4583
|
-
id:
|
|
4584
|
-
name:
|
|
4585
|
-
createdAt:
|
|
4458
|
+
var topicReferenceResponse = import_zod67.z.lazy(() => {
|
|
4459
|
+
return import_zod67.z.object({
|
|
4460
|
+
id: import_zod67.z.string(),
|
|
4461
|
+
name: import_zod67.z.string(),
|
|
4462
|
+
createdAt: import_zod67.z.string().optional()
|
|
4586
4463
|
}).transform((data) => ({
|
|
4587
4464
|
id: data["id"],
|
|
4588
4465
|
name: data["name"],
|
|
4589
4466
|
createdAt: data["createdAt"]
|
|
4590
4467
|
}));
|
|
4591
4468
|
});
|
|
4592
|
-
var topicReferenceRequest =
|
|
4593
|
-
return
|
|
4594
|
-
id:
|
|
4595
|
-
name:
|
|
4596
|
-
createdAt:
|
|
4469
|
+
var topicReferenceRequest = import_zod67.z.lazy(() => {
|
|
4470
|
+
return import_zod67.z.object({
|
|
4471
|
+
id: import_zod67.z.string(),
|
|
4472
|
+
name: import_zod67.z.string(),
|
|
4473
|
+
createdAt: import_zod67.z.string().optional()
|
|
4597
4474
|
}).transform((data) => ({
|
|
4598
4475
|
id: data["id"],
|
|
4599
4476
|
name: data["name"],
|
|
@@ -4602,21 +4479,21 @@ var topicReferenceRequest = import_zod68.z.lazy(() => {
|
|
|
4602
4479
|
});
|
|
4603
4480
|
|
|
4604
4481
|
// src/services/memories/models/explanation.ts
|
|
4605
|
-
var
|
|
4606
|
-
var explanation =
|
|
4607
|
-
return
|
|
4608
|
-
matchReason:
|
|
4609
|
-
matchedTerms:
|
|
4610
|
-
semanticSimilarity:
|
|
4611
|
-
contributingFactors:
|
|
4482
|
+
var import_zod68 = require("zod");
|
|
4483
|
+
var explanation = import_zod68.z.lazy(() => {
|
|
4484
|
+
return import_zod68.z.object({
|
|
4485
|
+
matchReason: import_zod68.z.string(),
|
|
4486
|
+
matchedTerms: import_zod68.z.array(import_zod68.z.string()).optional(),
|
|
4487
|
+
semanticSimilarity: import_zod68.z.number().optional(),
|
|
4488
|
+
contributingFactors: import_zod68.z.array(import_zod68.z.string()).optional()
|
|
4612
4489
|
});
|
|
4613
4490
|
});
|
|
4614
|
-
var explanationResponse =
|
|
4615
|
-
return
|
|
4616
|
-
matchReason:
|
|
4617
|
-
matchedTerms:
|
|
4618
|
-
semanticSimilarity:
|
|
4619
|
-
contributingFactors:
|
|
4491
|
+
var explanationResponse = import_zod68.z.lazy(() => {
|
|
4492
|
+
return import_zod68.z.object({
|
|
4493
|
+
matchReason: import_zod68.z.string(),
|
|
4494
|
+
matchedTerms: import_zod68.z.array(import_zod68.z.string()).optional(),
|
|
4495
|
+
semanticSimilarity: import_zod68.z.number().optional(),
|
|
4496
|
+
contributingFactors: import_zod68.z.array(import_zod68.z.string()).optional()
|
|
4620
4497
|
}).transform((data) => ({
|
|
4621
4498
|
matchReason: data["matchReason"],
|
|
4622
4499
|
matchedTerms: data["matchedTerms"],
|
|
@@ -4624,12 +4501,12 @@ var explanationResponse = import_zod69.z.lazy(() => {
|
|
|
4624
4501
|
contributingFactors: data["contributingFactors"]
|
|
4625
4502
|
}));
|
|
4626
4503
|
});
|
|
4627
|
-
var explanationRequest =
|
|
4628
|
-
return
|
|
4629
|
-
matchReason:
|
|
4630
|
-
matchedTerms:
|
|
4631
|
-
semanticSimilarity:
|
|
4632
|
-
contributingFactors:
|
|
4504
|
+
var explanationRequest = import_zod68.z.lazy(() => {
|
|
4505
|
+
return import_zod68.z.object({
|
|
4506
|
+
matchReason: import_zod68.z.string(),
|
|
4507
|
+
matchedTerms: import_zod68.z.array(import_zod68.z.string()).optional(),
|
|
4508
|
+
semanticSimilarity: import_zod68.z.number().optional(),
|
|
4509
|
+
contributingFactors: import_zod68.z.array(import_zod68.z.string()).optional()
|
|
4633
4510
|
}).transform((data) => ({
|
|
4634
4511
|
matchReason: data["matchReason"],
|
|
4635
4512
|
matchedTerms: data["matchedTerms"],
|
|
@@ -4639,33 +4516,33 @@ var explanationRequest = import_zod69.z.lazy(() => {
|
|
|
4639
4516
|
});
|
|
4640
4517
|
|
|
4641
4518
|
// src/services/memories/models/search-result.ts
|
|
4642
|
-
var searchResult =
|
|
4643
|
-
return
|
|
4519
|
+
var searchResult = import_zod69.z.lazy(() => {
|
|
4520
|
+
return import_zod69.z.object({
|
|
4644
4521
|
memory: searchResultMemory,
|
|
4645
|
-
score:
|
|
4646
|
-
entities:
|
|
4647
|
-
topics:
|
|
4648
|
-
searchMethod:
|
|
4649
|
-
hybridScore:
|
|
4650
|
-
vectorScore:
|
|
4651
|
-
vectorRank:
|
|
4652
|
-
fulltextScore:
|
|
4653
|
-
fulltextRank:
|
|
4522
|
+
score: import_zod69.z.number(),
|
|
4523
|
+
entities: import_zod69.z.array(entity).optional(),
|
|
4524
|
+
topics: import_zod69.z.array(topicReference).optional(),
|
|
4525
|
+
searchMethod: import_zod69.z.string().optional(),
|
|
4526
|
+
hybridScore: import_zod69.z.number().optional(),
|
|
4527
|
+
vectorScore: import_zod69.z.number().optional(),
|
|
4528
|
+
vectorRank: import_zod69.z.number().optional().nullable(),
|
|
4529
|
+
fulltextScore: import_zod69.z.number().optional(),
|
|
4530
|
+
fulltextRank: import_zod69.z.number().optional().nullable(),
|
|
4654
4531
|
explanation: explanation.optional()
|
|
4655
4532
|
});
|
|
4656
4533
|
});
|
|
4657
|
-
var searchResultResponse =
|
|
4658
|
-
return
|
|
4534
|
+
var searchResultResponse = import_zod69.z.lazy(() => {
|
|
4535
|
+
return import_zod69.z.object({
|
|
4659
4536
|
memory: searchResultMemoryResponse,
|
|
4660
|
-
score:
|
|
4661
|
-
entities:
|
|
4662
|
-
topics:
|
|
4663
|
-
searchMethod:
|
|
4664
|
-
hybridScore:
|
|
4665
|
-
vectorScore:
|
|
4666
|
-
vectorRank:
|
|
4667
|
-
fulltextScore:
|
|
4668
|
-
fulltextRank:
|
|
4537
|
+
score: import_zod69.z.number(),
|
|
4538
|
+
entities: import_zod69.z.array(entityResponse).optional(),
|
|
4539
|
+
topics: import_zod69.z.array(topicReferenceResponse).optional(),
|
|
4540
|
+
searchMethod: import_zod69.z.string().optional(),
|
|
4541
|
+
hybridScore: import_zod69.z.number().optional(),
|
|
4542
|
+
vectorScore: import_zod69.z.number().optional(),
|
|
4543
|
+
vectorRank: import_zod69.z.number().optional().nullable(),
|
|
4544
|
+
fulltextScore: import_zod69.z.number().optional(),
|
|
4545
|
+
fulltextRank: import_zod69.z.number().optional().nullable(),
|
|
4669
4546
|
explanation: explanationResponse.optional()
|
|
4670
4547
|
}).transform((data) => ({
|
|
4671
4548
|
memory: data["memory"],
|
|
@@ -4681,18 +4558,18 @@ var searchResultResponse = import_zod70.z.lazy(() => {
|
|
|
4681
4558
|
explanation: data["explanation"]
|
|
4682
4559
|
}));
|
|
4683
4560
|
});
|
|
4684
|
-
var searchResultRequest =
|
|
4685
|
-
return
|
|
4561
|
+
var searchResultRequest = import_zod69.z.lazy(() => {
|
|
4562
|
+
return import_zod69.z.object({
|
|
4686
4563
|
memory: searchResultMemoryRequest,
|
|
4687
|
-
score:
|
|
4688
|
-
entities:
|
|
4689
|
-
topics:
|
|
4690
|
-
searchMethod:
|
|
4691
|
-
hybridScore:
|
|
4692
|
-
vectorScore:
|
|
4693
|
-
vectorRank:
|
|
4694
|
-
fulltextScore:
|
|
4695
|
-
fulltextRank:
|
|
4564
|
+
score: import_zod69.z.number(),
|
|
4565
|
+
entities: import_zod69.z.array(entityRequest).optional(),
|
|
4566
|
+
topics: import_zod69.z.array(topicReferenceRequest).optional(),
|
|
4567
|
+
searchMethod: import_zod69.z.string().optional(),
|
|
4568
|
+
hybridScore: import_zod69.z.number().optional(),
|
|
4569
|
+
vectorScore: import_zod69.z.number().optional(),
|
|
4570
|
+
vectorRank: import_zod69.z.number().optional().nullable(),
|
|
4571
|
+
fulltextScore: import_zod69.z.number().optional(),
|
|
4572
|
+
fulltextRank: import_zod69.z.number().optional().nullable(),
|
|
4696
4573
|
explanation: explanationRequest.optional()
|
|
4697
4574
|
}).transform((data) => ({
|
|
4698
4575
|
memory: data["memory"],
|
|
@@ -4710,30 +4587,30 @@ var searchResultRequest = import_zod70.z.lazy(() => {
|
|
|
4710
4587
|
});
|
|
4711
4588
|
|
|
4712
4589
|
// src/services/memories/models/search-response-pagination.ts
|
|
4713
|
-
var
|
|
4714
|
-
var searchResponsePagination =
|
|
4715
|
-
return
|
|
4716
|
-
limit:
|
|
4717
|
-
offset:
|
|
4718
|
-
count:
|
|
4590
|
+
var import_zod70 = require("zod");
|
|
4591
|
+
var searchResponsePagination = import_zod70.z.lazy(() => {
|
|
4592
|
+
return import_zod70.z.object({
|
|
4593
|
+
limit: import_zod70.z.number().gte(1),
|
|
4594
|
+
offset: import_zod70.z.number().gte(0),
|
|
4595
|
+
count: import_zod70.z.number().gte(0)
|
|
4719
4596
|
});
|
|
4720
4597
|
});
|
|
4721
|
-
var searchResponsePaginationResponse =
|
|
4722
|
-
return
|
|
4723
|
-
limit:
|
|
4724
|
-
offset:
|
|
4725
|
-
count:
|
|
4598
|
+
var searchResponsePaginationResponse = import_zod70.z.lazy(() => {
|
|
4599
|
+
return import_zod70.z.object({
|
|
4600
|
+
limit: import_zod70.z.number().gte(1),
|
|
4601
|
+
offset: import_zod70.z.number().gte(0),
|
|
4602
|
+
count: import_zod70.z.number().gte(0)
|
|
4726
4603
|
}).transform((data) => ({
|
|
4727
4604
|
limit: data["limit"],
|
|
4728
4605
|
offset: data["offset"],
|
|
4729
4606
|
count: data["count"]
|
|
4730
4607
|
}));
|
|
4731
4608
|
});
|
|
4732
|
-
var searchResponsePaginationRequest =
|
|
4733
|
-
return
|
|
4734
|
-
limit:
|
|
4735
|
-
offset:
|
|
4736
|
-
count:
|
|
4609
|
+
var searchResponsePaginationRequest = import_zod70.z.lazy(() => {
|
|
4610
|
+
return import_zod70.z.object({
|
|
4611
|
+
limit: import_zod70.z.number().gte(1),
|
|
4612
|
+
offset: import_zod70.z.number().gte(0),
|
|
4613
|
+
count: import_zod70.z.number().gte(0)
|
|
4737
4614
|
}).transform((data) => ({
|
|
4738
4615
|
limit: data["limit"],
|
|
4739
4616
|
offset: data["offset"],
|
|
@@ -4742,29 +4619,29 @@ var searchResponsePaginationRequest = import_zod71.z.lazy(() => {
|
|
|
4742
4619
|
});
|
|
4743
4620
|
|
|
4744
4621
|
// src/services/memories/models/temporal-metadata.ts
|
|
4745
|
-
var
|
|
4622
|
+
var import_zod73 = require("zod");
|
|
4746
4623
|
|
|
4747
4624
|
// src/services/memories/models/event-time-range.ts
|
|
4748
|
-
var
|
|
4749
|
-
var eventTimeRange =
|
|
4750
|
-
return
|
|
4751
|
-
from:
|
|
4752
|
-
to:
|
|
4625
|
+
var import_zod71 = require("zod");
|
|
4626
|
+
var eventTimeRange = import_zod71.z.lazy(() => {
|
|
4627
|
+
return import_zod71.z.object({
|
|
4628
|
+
from: import_zod71.z.string().nullable(),
|
|
4629
|
+
to: import_zod71.z.string().nullable()
|
|
4753
4630
|
});
|
|
4754
4631
|
});
|
|
4755
|
-
var eventTimeRangeResponse =
|
|
4756
|
-
return
|
|
4757
|
-
from:
|
|
4758
|
-
to:
|
|
4632
|
+
var eventTimeRangeResponse = import_zod71.z.lazy(() => {
|
|
4633
|
+
return import_zod71.z.object({
|
|
4634
|
+
from: import_zod71.z.string().nullable(),
|
|
4635
|
+
to: import_zod71.z.string().nullable()
|
|
4759
4636
|
}).transform((data) => ({
|
|
4760
4637
|
from: data["from"],
|
|
4761
4638
|
to: data["to"]
|
|
4762
4639
|
}));
|
|
4763
4640
|
});
|
|
4764
|
-
var eventTimeRangeRequest =
|
|
4765
|
-
return
|
|
4766
|
-
from:
|
|
4767
|
-
to:
|
|
4641
|
+
var eventTimeRangeRequest = import_zod71.z.lazy(() => {
|
|
4642
|
+
return import_zod71.z.object({
|
|
4643
|
+
from: import_zod71.z.string().nullable(),
|
|
4644
|
+
to: import_zod71.z.string().nullable()
|
|
4768
4645
|
}).transform((data) => ({
|
|
4769
4646
|
from: data["from"],
|
|
4770
4647
|
to: data["to"]
|
|
@@ -4772,26 +4649,26 @@ var eventTimeRangeRequest = import_zod72.z.lazy(() => {
|
|
|
4772
4649
|
});
|
|
4773
4650
|
|
|
4774
4651
|
// src/services/memories/models/ingestion-time-range.ts
|
|
4775
|
-
var
|
|
4776
|
-
var ingestionTimeRange =
|
|
4777
|
-
return
|
|
4778
|
-
from:
|
|
4779
|
-
to:
|
|
4652
|
+
var import_zod72 = require("zod");
|
|
4653
|
+
var ingestionTimeRange = import_zod72.z.lazy(() => {
|
|
4654
|
+
return import_zod72.z.object({
|
|
4655
|
+
from: import_zod72.z.string().nullable(),
|
|
4656
|
+
to: import_zod72.z.string().nullable()
|
|
4780
4657
|
});
|
|
4781
4658
|
});
|
|
4782
|
-
var ingestionTimeRangeResponse =
|
|
4783
|
-
return
|
|
4784
|
-
from:
|
|
4785
|
-
to:
|
|
4659
|
+
var ingestionTimeRangeResponse = import_zod72.z.lazy(() => {
|
|
4660
|
+
return import_zod72.z.object({
|
|
4661
|
+
from: import_zod72.z.string().nullable(),
|
|
4662
|
+
to: import_zod72.z.string().nullable()
|
|
4786
4663
|
}).transform((data) => ({
|
|
4787
4664
|
from: data["from"],
|
|
4788
4665
|
to: data["to"]
|
|
4789
4666
|
}));
|
|
4790
4667
|
});
|
|
4791
|
-
var ingestionTimeRangeRequest =
|
|
4792
|
-
return
|
|
4793
|
-
from:
|
|
4794
|
-
to:
|
|
4668
|
+
var ingestionTimeRangeRequest = import_zod72.z.lazy(() => {
|
|
4669
|
+
return import_zod72.z.object({
|
|
4670
|
+
from: import_zod72.z.string().nullable(),
|
|
4671
|
+
to: import_zod72.z.string().nullable()
|
|
4795
4672
|
}).transform((data) => ({
|
|
4796
4673
|
from: data["from"],
|
|
4797
4674
|
to: data["to"]
|
|
@@ -4799,26 +4676,26 @@ var ingestionTimeRangeRequest = import_zod73.z.lazy(() => {
|
|
|
4799
4676
|
});
|
|
4800
4677
|
|
|
4801
4678
|
// src/services/memories/models/temporal-metadata.ts
|
|
4802
|
-
var temporalMetadata =
|
|
4803
|
-
return
|
|
4804
|
-
temporalMode:
|
|
4805
|
-
asOfTime:
|
|
4806
|
-
validAtTime:
|
|
4679
|
+
var temporalMetadata = import_zod73.z.lazy(() => {
|
|
4680
|
+
return import_zod73.z.object({
|
|
4681
|
+
temporalMode: import_zod73.z.string(),
|
|
4682
|
+
asOfTime: import_zod73.z.string().nullable(),
|
|
4683
|
+
validAtTime: import_zod73.z.string().nullable(),
|
|
4807
4684
|
eventTimeRange: eventTimeRange.nullable(),
|
|
4808
4685
|
ingestionTimeRange: ingestionTimeRange.nullable(),
|
|
4809
|
-
includeExpired:
|
|
4810
|
-
temporalFieldsIncluded:
|
|
4686
|
+
includeExpired: import_zod73.z.boolean(),
|
|
4687
|
+
temporalFieldsIncluded: import_zod73.z.boolean()
|
|
4811
4688
|
});
|
|
4812
4689
|
});
|
|
4813
|
-
var temporalMetadataResponse =
|
|
4814
|
-
return
|
|
4815
|
-
temporalMode:
|
|
4816
|
-
asOfTime:
|
|
4817
|
-
validAtTime:
|
|
4690
|
+
var temporalMetadataResponse = import_zod73.z.lazy(() => {
|
|
4691
|
+
return import_zod73.z.object({
|
|
4692
|
+
temporalMode: import_zod73.z.string(),
|
|
4693
|
+
asOfTime: import_zod73.z.string().nullable(),
|
|
4694
|
+
validAtTime: import_zod73.z.string().nullable(),
|
|
4818
4695
|
eventTimeRange: eventTimeRangeResponse.nullable(),
|
|
4819
4696
|
ingestionTimeRange: ingestionTimeRangeResponse.nullable(),
|
|
4820
|
-
includeExpired:
|
|
4821
|
-
temporalFieldsIncluded:
|
|
4697
|
+
includeExpired: import_zod73.z.boolean(),
|
|
4698
|
+
temporalFieldsIncluded: import_zod73.z.boolean()
|
|
4822
4699
|
}).transform((data) => ({
|
|
4823
4700
|
temporalMode: data["temporalMode"],
|
|
4824
4701
|
asOfTime: data["asOfTime"],
|
|
@@ -4829,15 +4706,15 @@ var temporalMetadataResponse = import_zod74.z.lazy(() => {
|
|
|
4829
4706
|
temporalFieldsIncluded: data["temporalFieldsIncluded"]
|
|
4830
4707
|
}));
|
|
4831
4708
|
});
|
|
4832
|
-
var temporalMetadataRequest =
|
|
4833
|
-
return
|
|
4834
|
-
temporalMode:
|
|
4835
|
-
asOfTime:
|
|
4836
|
-
validAtTime:
|
|
4709
|
+
var temporalMetadataRequest = import_zod73.z.lazy(() => {
|
|
4710
|
+
return import_zod73.z.object({
|
|
4711
|
+
temporalMode: import_zod73.z.string(),
|
|
4712
|
+
asOfTime: import_zod73.z.string().nullable(),
|
|
4713
|
+
validAtTime: import_zod73.z.string().nullable(),
|
|
4837
4714
|
eventTimeRange: eventTimeRangeRequest.nullable(),
|
|
4838
4715
|
ingestionTimeRange: ingestionTimeRangeRequest.nullable(),
|
|
4839
|
-
includeExpired:
|
|
4840
|
-
temporalFieldsIncluded:
|
|
4716
|
+
includeExpired: import_zod73.z.boolean(),
|
|
4717
|
+
temporalFieldsIncluded: import_zod73.z.boolean()
|
|
4841
4718
|
}).transform((data) => ({
|
|
4842
4719
|
temporalMode: data["temporalMode"],
|
|
4843
4720
|
asOfTime: data["asOfTime"],
|
|
@@ -4850,18 +4727,18 @@ var temporalMetadataRequest = import_zod74.z.lazy(() => {
|
|
|
4850
4727
|
});
|
|
4851
4728
|
|
|
4852
4729
|
// src/services/memories/models/search-response.ts
|
|
4853
|
-
var searchResponse =
|
|
4854
|
-
return
|
|
4855
|
-
data:
|
|
4856
|
-
searchMethod:
|
|
4730
|
+
var searchResponse = import_zod74.z.lazy(() => {
|
|
4731
|
+
return import_zod74.z.object({
|
|
4732
|
+
data: import_zod74.z.array(searchResult),
|
|
4733
|
+
searchMethod: import_zod74.z.string().optional(),
|
|
4857
4734
|
pagination: searchResponsePagination,
|
|
4858
4735
|
temporalMetadata: temporalMetadata.nullable()
|
|
4859
4736
|
});
|
|
4860
4737
|
});
|
|
4861
|
-
var searchResponseResponse =
|
|
4862
|
-
return
|
|
4863
|
-
data:
|
|
4864
|
-
searchMethod:
|
|
4738
|
+
var searchResponseResponse = import_zod74.z.lazy(() => {
|
|
4739
|
+
return import_zod74.z.object({
|
|
4740
|
+
data: import_zod74.z.array(searchResultResponse),
|
|
4741
|
+
searchMethod: import_zod74.z.string().optional(),
|
|
4865
4742
|
pagination: searchResponsePaginationResponse,
|
|
4866
4743
|
temporalMetadata: temporalMetadataResponse.nullable()
|
|
4867
4744
|
}).transform((data) => ({
|
|
@@ -4871,10 +4748,10 @@ var searchResponseResponse = import_zod75.z.lazy(() => {
|
|
|
4871
4748
|
temporalMetadata: data["temporalMetadata"]
|
|
4872
4749
|
}));
|
|
4873
4750
|
});
|
|
4874
|
-
var searchResponseRequest =
|
|
4875
|
-
return
|
|
4876
|
-
data:
|
|
4877
|
-
searchMethod:
|
|
4751
|
+
var searchResponseRequest = import_zod74.z.lazy(() => {
|
|
4752
|
+
return import_zod74.z.object({
|
|
4753
|
+
data: import_zod74.z.array(searchResultRequest),
|
|
4754
|
+
searchMethod: import_zod74.z.string().optional(),
|
|
4878
4755
|
pagination: searchResponsePaginationRequest,
|
|
4879
4756
|
temporalMetadata: temporalMetadataRequest.nullable()
|
|
4880
4757
|
}).transform((data) => ({
|
|
@@ -4885,6 +4762,133 @@ var searchResponseRequest = import_zod75.z.lazy(() => {
|
|
|
4885
4762
|
}));
|
|
4886
4763
|
});
|
|
4887
4764
|
|
|
4765
|
+
// src/services/memories/models/search-request.ts
|
|
4766
|
+
var import_zod75 = require("zod");
|
|
4767
|
+
var searchRequest = import_zod75.z.lazy(() => {
|
|
4768
|
+
return import_zod75.z.object({
|
|
4769
|
+
query: import_zod75.z.string().min(1),
|
|
4770
|
+
mode: import_zod75.z.string().optional(),
|
|
4771
|
+
searchMethod: import_zod75.z.string().optional(),
|
|
4772
|
+
limit: import_zod75.z.number().gte(1).lte(100).optional(),
|
|
4773
|
+
offset: import_zod75.z.number().gte(0).optional(),
|
|
4774
|
+
vectorWeight: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4775
|
+
fulltextWeight: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4776
|
+
threshold: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4777
|
+
explain: import_zod75.z.boolean().optional(),
|
|
4778
|
+
asOfTime: import_zod75.z.string().optional(),
|
|
4779
|
+
validAtTime: import_zod75.z.string().optional(),
|
|
4780
|
+
eventTimeFrom: import_zod75.z.string().optional(),
|
|
4781
|
+
eventTimeTo: import_zod75.z.string().optional(),
|
|
4782
|
+
ingestionTimeFrom: import_zod75.z.string().optional(),
|
|
4783
|
+
ingestionTimeTo: import_zod75.z.string().optional(),
|
|
4784
|
+
includeExpired: import_zod75.z.boolean().optional(),
|
|
4785
|
+
temporalMode: import_zod75.z.string().optional(),
|
|
4786
|
+
topics: import_zod75.z.array(import_zod75.z.string()).optional(),
|
|
4787
|
+
memoryType: import_zod75.z.string().optional(),
|
|
4788
|
+
conversationId: import_zod75.z.string().optional(),
|
|
4789
|
+
includeTopics: import_zod75.z.boolean().optional(),
|
|
4790
|
+
includeEntities: import_zod75.z.boolean().optional()
|
|
4791
|
+
});
|
|
4792
|
+
});
|
|
4793
|
+
var searchRequestResponse = import_zod75.z.lazy(() => {
|
|
4794
|
+
return import_zod75.z.object({
|
|
4795
|
+
query: import_zod75.z.string().min(1),
|
|
4796
|
+
mode: import_zod75.z.string().optional(),
|
|
4797
|
+
searchMethod: import_zod75.z.string().optional(),
|
|
4798
|
+
limit: import_zod75.z.number().gte(1).lte(100).optional(),
|
|
4799
|
+
offset: import_zod75.z.number().gte(0).optional(),
|
|
4800
|
+
vectorWeight: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4801
|
+
fulltextWeight: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4802
|
+
threshold: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4803
|
+
explain: import_zod75.z.boolean().optional(),
|
|
4804
|
+
asOfTime: import_zod75.z.string().optional(),
|
|
4805
|
+
validAtTime: import_zod75.z.string().optional(),
|
|
4806
|
+
eventTimeFrom: import_zod75.z.string().optional(),
|
|
4807
|
+
eventTimeTo: import_zod75.z.string().optional(),
|
|
4808
|
+
ingestionTimeFrom: import_zod75.z.string().optional(),
|
|
4809
|
+
ingestionTimeTo: import_zod75.z.string().optional(),
|
|
4810
|
+
includeExpired: import_zod75.z.boolean().optional(),
|
|
4811
|
+
temporalMode: import_zod75.z.string().optional(),
|
|
4812
|
+
topics: import_zod75.z.array(import_zod75.z.string()).optional(),
|
|
4813
|
+
memoryType: import_zod75.z.string().optional(),
|
|
4814
|
+
conversationId: import_zod75.z.string().optional(),
|
|
4815
|
+
includeTopics: import_zod75.z.boolean().optional(),
|
|
4816
|
+
includeEntities: import_zod75.z.boolean().optional()
|
|
4817
|
+
}).transform((data) => ({
|
|
4818
|
+
query: data["query"],
|
|
4819
|
+
mode: data["mode"],
|
|
4820
|
+
searchMethod: data["searchMethod"],
|
|
4821
|
+
limit: data["limit"],
|
|
4822
|
+
offset: data["offset"],
|
|
4823
|
+
vectorWeight: data["vectorWeight"],
|
|
4824
|
+
fulltextWeight: data["fulltextWeight"],
|
|
4825
|
+
threshold: data["threshold"],
|
|
4826
|
+
explain: data["explain"],
|
|
4827
|
+
asOfTime: data["asOfTime"],
|
|
4828
|
+
validAtTime: data["validAtTime"],
|
|
4829
|
+
eventTimeFrom: data["eventTimeFrom"],
|
|
4830
|
+
eventTimeTo: data["eventTimeTo"],
|
|
4831
|
+
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4832
|
+
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4833
|
+
includeExpired: data["includeExpired"],
|
|
4834
|
+
temporalMode: data["temporalMode"],
|
|
4835
|
+
topics: data["topics"],
|
|
4836
|
+
memoryType: data["memoryType"],
|
|
4837
|
+
conversationId: data["conversationId"],
|
|
4838
|
+
includeTopics: data["includeTopics"],
|
|
4839
|
+
includeEntities: data["includeEntities"]
|
|
4840
|
+
}));
|
|
4841
|
+
});
|
|
4842
|
+
var searchRequestRequest = import_zod75.z.lazy(() => {
|
|
4843
|
+
return import_zod75.z.object({
|
|
4844
|
+
query: import_zod75.z.string().min(1),
|
|
4845
|
+
mode: import_zod75.z.string().optional(),
|
|
4846
|
+
searchMethod: import_zod75.z.string().optional(),
|
|
4847
|
+
limit: import_zod75.z.number().gte(1).lte(100).optional(),
|
|
4848
|
+
offset: import_zod75.z.number().gte(0).optional(),
|
|
4849
|
+
vectorWeight: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4850
|
+
fulltextWeight: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4851
|
+
threshold: import_zod75.z.number().gte(0).lte(1).optional(),
|
|
4852
|
+
explain: import_zod75.z.boolean().optional(),
|
|
4853
|
+
asOfTime: import_zod75.z.string().optional(),
|
|
4854
|
+
validAtTime: import_zod75.z.string().optional(),
|
|
4855
|
+
eventTimeFrom: import_zod75.z.string().optional(),
|
|
4856
|
+
eventTimeTo: import_zod75.z.string().optional(),
|
|
4857
|
+
ingestionTimeFrom: import_zod75.z.string().optional(),
|
|
4858
|
+
ingestionTimeTo: import_zod75.z.string().optional(),
|
|
4859
|
+
includeExpired: import_zod75.z.boolean().optional(),
|
|
4860
|
+
temporalMode: import_zod75.z.string().optional(),
|
|
4861
|
+
topics: import_zod75.z.array(import_zod75.z.string()).optional(),
|
|
4862
|
+
memoryType: import_zod75.z.string().optional(),
|
|
4863
|
+
conversationId: import_zod75.z.string().optional(),
|
|
4864
|
+
includeTopics: import_zod75.z.boolean().optional(),
|
|
4865
|
+
includeEntities: import_zod75.z.boolean().optional()
|
|
4866
|
+
}).transform((data) => ({
|
|
4867
|
+
query: data["query"],
|
|
4868
|
+
mode: data["mode"],
|
|
4869
|
+
searchMethod: data["searchMethod"],
|
|
4870
|
+
limit: data["limit"],
|
|
4871
|
+
offset: data["offset"],
|
|
4872
|
+
vectorWeight: data["vectorWeight"],
|
|
4873
|
+
fulltextWeight: data["fulltextWeight"],
|
|
4874
|
+
threshold: data["threshold"],
|
|
4875
|
+
explain: data["explain"],
|
|
4876
|
+
asOfTime: data["asOfTime"],
|
|
4877
|
+
validAtTime: data["validAtTime"],
|
|
4878
|
+
eventTimeFrom: data["eventTimeFrom"],
|
|
4879
|
+
eventTimeTo: data["eventTimeTo"],
|
|
4880
|
+
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4881
|
+
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4882
|
+
includeExpired: data["includeExpired"],
|
|
4883
|
+
temporalMode: data["temporalMode"],
|
|
4884
|
+
topics: data["topics"],
|
|
4885
|
+
memoryType: data["memoryType"],
|
|
4886
|
+
conversationId: data["conversationId"],
|
|
4887
|
+
includeTopics: data["includeTopics"],
|
|
4888
|
+
includeEntities: data["includeEntities"]
|
|
4889
|
+
}));
|
|
4890
|
+
});
|
|
4891
|
+
|
|
4888
4892
|
// src/services/memories/models/get-similar-memories-ok-response.ts
|
|
4889
4893
|
var import_zod78 = require("zod");
|
|
4890
4894
|
|
|
@@ -5275,7 +5279,15 @@ var MemoriesService = class extends BaseService {
|
|
|
5275
5279
|
return this.client.call(request);
|
|
5276
5280
|
}
|
|
5277
5281
|
/**
|
|
5278
|
-
* List all memories for the authenticated user with pagination
|
|
5282
|
+
* List all memories for the authenticated user with pagination.
|
|
5283
|
+
**ID Prefix Search:**
|
|
5284
|
+
Use the `idPrefix` parameter for git-style short ID lookup. This enables efficient
|
|
5285
|
+
server-side filtering instead of fetching all memories and filtering client-side.
|
|
5286
|
+
- Minimum 6 characters required for `idPrefix`
|
|
5287
|
+
- Returns matching memories directly (no need for secondary fetch)
|
|
5288
|
+
- Example: `?idPrefix=2d09116a` finds memories starting with that prefix
|
|
5289
|
+
|
|
5290
|
+
* @param {string} [params.idPrefix] - Filter memories by ID prefix (git-style short ID lookup). Minimum 6 characters.
|
|
5279
5291
|
* @param {number} [params.limit] - Maximum number of memories to return
|
|
5280
5292
|
* @param {number} [params.offset] - Number of memories to skip
|
|
5281
5293
|
* @param {number} [params.page] - Page number (alternative to offset)
|
|
@@ -5300,6 +5312,9 @@ var MemoriesService = class extends BaseService {
|
|
|
5300
5312
|
contentType: "json" /* Json */,
|
|
5301
5313
|
status: 500
|
|
5302
5314
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
|
5315
|
+
key: "idPrefix",
|
|
5316
|
+
value: params == null ? void 0 : params.idPrefix
|
|
5317
|
+
}).addQueryParam({
|
|
5303
5318
|
key: "limit",
|
|
5304
5319
|
value: params == null ? void 0 : params.limit
|
|
5305
5320
|
}).addQueryParam({
|
|
@@ -5357,6 +5372,137 @@ var MemoriesService = class extends BaseService {
|
|
|
5357
5372
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
5358
5373
|
return this.client.call(request);
|
|
5359
5374
|
}
|
|
5375
|
+
/**
|
|
5376
|
+
* Search memories using query parameters. Provides the same functionality asPOST /api/memories/search but accepts parameters via query string.
|
|
5377
|
+
|
|
5378
|
+
**Benefits of GET:**
|
|
5379
|
+
- Faster response times (~3x improvement)
|
|
5380
|
+
- Browser/CDN caching support
|
|
5381
|
+
- Simpler integration for read-only clients
|
|
5382
|
+
|
|
5383
|
+
**Search Methods:**
|
|
5384
|
+
- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
5385
|
+
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
5386
|
+
- **keyword**: Traditional fulltext search using Lucene
|
|
5387
|
+
|
|
5388
|
+
**Array Parameters:**
|
|
5389
|
+
- `topics`: Provide as comma-separated values (e.g., `topics=typescript,api-design`)
|
|
5390
|
+
|
|
5391
|
+
* @param {string} params.q - Search query string
|
|
5392
|
+
* @param {SearchMemoriesGetSearchMethod} [params.searchMethod] - Search algorithm to use
|
|
5393
|
+
* @param {number} [params.limit] - Maximum number of results to return
|
|
5394
|
+
* @param {number} [params.offset] - Number of results to skip for pagination
|
|
5395
|
+
* @param {number} [params.threshold] - Minimum similarity threshold for semantic search
|
|
5396
|
+
* @param {SearchMemoriesGetMode} [params.mode] - Content filtering mode
|
|
5397
|
+
* @param {number} [params.vectorWeight] - Weight for vector similarity in hybrid search
|
|
5398
|
+
* @param {number} [params.fulltextWeight] - Weight for fulltext matching in hybrid search
|
|
5399
|
+
* @param {string} [params.topics] - Comma-separated list of topics to filter by
|
|
5400
|
+
* @param {SearchMemoriesGetMemoryType} [params.memoryType] - Filter by memory type
|
|
5401
|
+
* @param {string} [params.conversationId] - Filter by conversation ID
|
|
5402
|
+
* @param {boolean} [params.explain] - Include detailed match explanations in results
|
|
5403
|
+
* @param {boolean} [params.includeTopics] - Include associated topics in results
|
|
5404
|
+
* @param {boolean} [params.includeEntities] - Include mentioned entities in results
|
|
5405
|
+
* @param {string} [params.asOfTime] - Point-in-time query (ISO 8601 datetime)
|
|
5406
|
+
* @param {string} [params.validAtTime] - Filter by validity time (ISO 8601 datetime)
|
|
5407
|
+
* @param {string} [params.eventTimeFrom] - Event time range start (ISO 8601 datetime)
|
|
5408
|
+
* @param {string} [params.eventTimeTo] - Event time range end (ISO 8601 datetime)
|
|
5409
|
+
* @param {string} [params.ingestionTimeFrom] - Ingestion time range start (ISO 8601 datetime)
|
|
5410
|
+
* @param {string} [params.ingestionTimeTo] - Ingestion time range end (ISO 8601 datetime)
|
|
5411
|
+
* @param {boolean} [params.includeExpired] - Include expired memories in results
|
|
5412
|
+
* @param {SearchMemoriesGetTemporalMode} [params.temporalMode] - Temporal query mode
|
|
5413
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
5414
|
+
* @returns {Promise<HttpResponse<SearchResponse>>} - Search results
|
|
5415
|
+
*/
|
|
5416
|
+
async searchMemoriesGet(params, requestConfig) {
|
|
5417
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/api/memories/search").setRequestSchema(import_zod83.z.any()).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
5418
|
+
schema: searchResponseResponse,
|
|
5419
|
+
contentType: "json" /* Json */,
|
|
5420
|
+
status: 200
|
|
5421
|
+
}).addError({
|
|
5422
|
+
error: Error2,
|
|
5423
|
+
contentType: "json" /* Json */,
|
|
5424
|
+
status: 400
|
|
5425
|
+
}).addError({
|
|
5426
|
+
error: Error2,
|
|
5427
|
+
contentType: "json" /* Json */,
|
|
5428
|
+
status: 401
|
|
5429
|
+
}).addError({
|
|
5430
|
+
error: Error2,
|
|
5431
|
+
contentType: "json" /* Json */,
|
|
5432
|
+
status: 422
|
|
5433
|
+
}).addError({
|
|
5434
|
+
error: Error2,
|
|
5435
|
+
contentType: "json" /* Json */,
|
|
5436
|
+
status: 500
|
|
5437
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
|
5438
|
+
key: "q",
|
|
5439
|
+
value: params == null ? void 0 : params.q
|
|
5440
|
+
}).addQueryParam({
|
|
5441
|
+
key: "searchMethod",
|
|
5442
|
+
value: params == null ? void 0 : params.searchMethod
|
|
5443
|
+
}).addQueryParam({
|
|
5444
|
+
key: "limit",
|
|
5445
|
+
value: params == null ? void 0 : params.limit
|
|
5446
|
+
}).addQueryParam({
|
|
5447
|
+
key: "offset",
|
|
5448
|
+
value: params == null ? void 0 : params.offset
|
|
5449
|
+
}).addQueryParam({
|
|
5450
|
+
key: "threshold",
|
|
5451
|
+
value: params == null ? void 0 : params.threshold
|
|
5452
|
+
}).addQueryParam({
|
|
5453
|
+
key: "mode",
|
|
5454
|
+
value: params == null ? void 0 : params.mode
|
|
5455
|
+
}).addQueryParam({
|
|
5456
|
+
key: "vectorWeight",
|
|
5457
|
+
value: params == null ? void 0 : params.vectorWeight
|
|
5458
|
+
}).addQueryParam({
|
|
5459
|
+
key: "fulltextWeight",
|
|
5460
|
+
value: params == null ? void 0 : params.fulltextWeight
|
|
5461
|
+
}).addQueryParam({
|
|
5462
|
+
key: "topics",
|
|
5463
|
+
value: params == null ? void 0 : params.topics
|
|
5464
|
+
}).addQueryParam({
|
|
5465
|
+
key: "memoryType",
|
|
5466
|
+
value: params == null ? void 0 : params.memoryType
|
|
5467
|
+
}).addQueryParam({
|
|
5468
|
+
key: "conversationId",
|
|
5469
|
+
value: params == null ? void 0 : params.conversationId
|
|
5470
|
+
}).addQueryParam({
|
|
5471
|
+
key: "explain",
|
|
5472
|
+
value: params == null ? void 0 : params.explain
|
|
5473
|
+
}).addQueryParam({
|
|
5474
|
+
key: "includeTopics",
|
|
5475
|
+
value: params == null ? void 0 : params.includeTopics
|
|
5476
|
+
}).addQueryParam({
|
|
5477
|
+
key: "includeEntities",
|
|
5478
|
+
value: params == null ? void 0 : params.includeEntities
|
|
5479
|
+
}).addQueryParam({
|
|
5480
|
+
key: "asOfTime",
|
|
5481
|
+
value: params == null ? void 0 : params.asOfTime
|
|
5482
|
+
}).addQueryParam({
|
|
5483
|
+
key: "validAtTime",
|
|
5484
|
+
value: params == null ? void 0 : params.validAtTime
|
|
5485
|
+
}).addQueryParam({
|
|
5486
|
+
key: "eventTimeFrom",
|
|
5487
|
+
value: params == null ? void 0 : params.eventTimeFrom
|
|
5488
|
+
}).addQueryParam({
|
|
5489
|
+
key: "eventTimeTo",
|
|
5490
|
+
value: params == null ? void 0 : params.eventTimeTo
|
|
5491
|
+
}).addQueryParam({
|
|
5492
|
+
key: "ingestionTimeFrom",
|
|
5493
|
+
value: params == null ? void 0 : params.ingestionTimeFrom
|
|
5494
|
+
}).addQueryParam({
|
|
5495
|
+
key: "ingestionTimeTo",
|
|
5496
|
+
value: params == null ? void 0 : params.ingestionTimeTo
|
|
5497
|
+
}).addQueryParam({
|
|
5498
|
+
key: "includeExpired",
|
|
5499
|
+
value: params == null ? void 0 : params.includeExpired
|
|
5500
|
+
}).addQueryParam({
|
|
5501
|
+
key: "temporalMode",
|
|
5502
|
+
value: params == null ? void 0 : params.temporalMode
|
|
5503
|
+
}).build();
|
|
5504
|
+
return this.client.call(request);
|
|
5505
|
+
}
|
|
5360
5506
|
/**
|
|
5361
5507
|
* Search memories using different search methods:- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
5362
5508
|
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
@@ -5536,29 +5682,61 @@ var MemoryMemoryType2 = /* @__PURE__ */ ((MemoryMemoryType22) => {
|
|
|
5536
5682
|
return MemoryMemoryType22;
|
|
5537
5683
|
})(MemoryMemoryType2 || {});
|
|
5538
5684
|
|
|
5539
|
-
// src/services/memories/models/
|
|
5540
|
-
var
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
return
|
|
5545
|
-
})(
|
|
5546
|
-
|
|
5547
|
-
// src/services/memories/models/search-
|
|
5548
|
-
var
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
return
|
|
5553
|
-
})(
|
|
5554
|
-
|
|
5555
|
-
// src/services/memories/models/
|
|
5556
|
-
var
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
return
|
|
5561
|
-
})(
|
|
5685
|
+
// src/services/memories/models/search-memories-get-search-method.ts
|
|
5686
|
+
var SearchMemoriesGetSearchMethod = /* @__PURE__ */ ((SearchMemoriesGetSearchMethod2) => {
|
|
5687
|
+
SearchMemoriesGetSearchMethod2["KEYWORD"] = "keyword";
|
|
5688
|
+
SearchMemoriesGetSearchMethod2["SEMANTIC"] = "semantic";
|
|
5689
|
+
SearchMemoriesGetSearchMethod2["HYBRID"] = "hybrid";
|
|
5690
|
+
return SearchMemoriesGetSearchMethod2;
|
|
5691
|
+
})(SearchMemoriesGetSearchMethod || {});
|
|
5692
|
+
|
|
5693
|
+
// src/services/memories/models/search-memories-get-mode.ts
|
|
5694
|
+
var SearchMemoriesGetMode = /* @__PURE__ */ ((SearchMemoriesGetMode2) => {
|
|
5695
|
+
SearchMemoriesGetMode2["UNIFIED"] = "unified";
|
|
5696
|
+
SearchMemoriesGetMode2["CONTENT"] = "content";
|
|
5697
|
+
SearchMemoriesGetMode2["FACTS"] = "facts";
|
|
5698
|
+
return SearchMemoriesGetMode2;
|
|
5699
|
+
})(SearchMemoriesGetMode || {});
|
|
5700
|
+
|
|
5701
|
+
// src/services/memories/models/search-memories-get-memory-type.ts
|
|
5702
|
+
var SearchMemoriesGetMemoryType = /* @__PURE__ */ ((SearchMemoriesGetMemoryType2) => {
|
|
5703
|
+
SearchMemoriesGetMemoryType2["EPISODIC"] = "episodic";
|
|
5704
|
+
SearchMemoriesGetMemoryType2["SEMANTIC"] = "semantic";
|
|
5705
|
+
SearchMemoriesGetMemoryType2["PROCEDURAL"] = "procedural";
|
|
5706
|
+
return SearchMemoriesGetMemoryType2;
|
|
5707
|
+
})(SearchMemoriesGetMemoryType || {});
|
|
5708
|
+
|
|
5709
|
+
// src/services/memories/models/search-memories-get-temporal-mode.ts
|
|
5710
|
+
var SearchMemoriesGetTemporalMode = /* @__PURE__ */ ((SearchMemoriesGetTemporalMode2) => {
|
|
5711
|
+
SearchMemoriesGetTemporalMode2["CURRENT"] = "current";
|
|
5712
|
+
SearchMemoriesGetTemporalMode2["HISTORICAL"] = "historical";
|
|
5713
|
+
SearchMemoriesGetTemporalMode2["EVOLUTION"] = "evolution";
|
|
5714
|
+
return SearchMemoriesGetTemporalMode2;
|
|
5715
|
+
})(SearchMemoriesGetTemporalMode || {});
|
|
5716
|
+
|
|
5717
|
+
// src/services/memories/models/search-request-mode.ts
|
|
5718
|
+
var SearchRequestMode = /* @__PURE__ */ ((SearchRequestMode2) => {
|
|
5719
|
+
SearchRequestMode2["UNIFIED"] = "unified";
|
|
5720
|
+
SearchRequestMode2["CONTENT"] = "content";
|
|
5721
|
+
SearchRequestMode2["FACTS"] = "facts";
|
|
5722
|
+
return SearchRequestMode2;
|
|
5723
|
+
})(SearchRequestMode || {});
|
|
5724
|
+
|
|
5725
|
+
// src/services/memories/models/search-request-search-method.ts
|
|
5726
|
+
var SearchRequestSearchMethod = /* @__PURE__ */ ((SearchRequestSearchMethod2) => {
|
|
5727
|
+
SearchRequestSearchMethod2["KEYWORD"] = "keyword";
|
|
5728
|
+
SearchRequestSearchMethod2["SEMANTIC"] = "semantic";
|
|
5729
|
+
SearchRequestSearchMethod2["HYBRID"] = "hybrid";
|
|
5730
|
+
return SearchRequestSearchMethod2;
|
|
5731
|
+
})(SearchRequestSearchMethod || {});
|
|
5732
|
+
|
|
5733
|
+
// src/services/memories/models/search-request-temporal-mode.ts
|
|
5734
|
+
var SearchRequestTemporalMode = /* @__PURE__ */ ((SearchRequestTemporalMode2) => {
|
|
5735
|
+
SearchRequestTemporalMode2["CURRENT"] = "current";
|
|
5736
|
+
SearchRequestTemporalMode2["HISTORICAL"] = "historical";
|
|
5737
|
+
SearchRequestTemporalMode2["EVOLUTION"] = "evolution";
|
|
5738
|
+
return SearchRequestTemporalMode2;
|
|
5739
|
+
})(SearchRequestTemporalMode || {});
|
|
5562
5740
|
|
|
5563
5741
|
// src/services/memories/models/search-request-memory-type.ts
|
|
5564
5742
|
var SearchRequestMemoryType = /* @__PURE__ */ ((SearchRequestMemoryType2) => {
|
|
@@ -7926,15 +8104,19 @@ var Memnexus = class {
|
|
|
7926
8104
|
MemoryMemoryType2,
|
|
7927
8105
|
MemoryMemoryType3,
|
|
7928
8106
|
MemoryMemoryType4,
|
|
7929
|
-
Mode,
|
|
7930
8107
|
NoCache,
|
|
7931
8108
|
PatternsService,
|
|
7932
8109
|
Role,
|
|
7933
|
-
|
|
8110
|
+
SearchMemoriesGetMemoryType,
|
|
8111
|
+
SearchMemoriesGetMode,
|
|
8112
|
+
SearchMemoriesGetSearchMethod,
|
|
8113
|
+
SearchMemoriesGetTemporalMode,
|
|
7934
8114
|
SearchRequestMemoryType,
|
|
8115
|
+
SearchRequestMode,
|
|
8116
|
+
SearchRequestSearchMethod,
|
|
8117
|
+
SearchRequestTemporalMode,
|
|
7935
8118
|
ServiceCheckStatus,
|
|
7936
8119
|
SystemService,
|
|
7937
|
-
TemporalMode,
|
|
7938
8120
|
TopicsService,
|
|
7939
8121
|
UpdateMemoryRequestMemoryType
|
|
7940
8122
|
});
|