@papr/memory 1.20.0 → 2.0.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/CHANGELOG.md +61 -0
- package/LICENSE +1 -1
- package/README.md +13 -1
- package/client.d.mts +37 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +37 -9
- package/client.d.ts.map +1 -1
- package/client.js +17 -2
- package/client.js.map +1 -1
- package/client.mjs +17 -2
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/tslib.js +22 -22
- package/package.json +1 -1
- package/resources/document.d.mts +16 -3
- package/resources/document.d.mts.map +1 -1
- package/resources/document.d.ts +16 -3
- package/resources/document.d.ts.map +1 -1
- package/resources/index.d.mts +6 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/memory.d.mts +498 -119
- package/resources/memory.d.mts.map +1 -1
- package/resources/memory.d.ts +498 -119
- package/resources/memory.d.ts.map +1 -1
- package/resources/memory.js +8 -4
- package/resources/memory.js.map +1 -1
- package/resources/memory.mjs +8 -4
- package/resources/memory.mjs.map +1 -1
- package/resources/messages/index.d.mts +3 -0
- package/resources/messages/index.d.mts.map +1 -0
- package/resources/messages/index.d.ts +3 -0
- package/resources/messages/index.d.ts.map +1 -0
- package/resources/messages/index.js +9 -0
- package/resources/messages/index.js.map +1 -0
- package/resources/messages/index.mjs +4 -0
- package/resources/messages/index.mjs.map +1 -0
- package/resources/messages/messages.d.mts +160 -0
- package/resources/messages/messages.d.mts.map +1 -0
- package/resources/messages/messages.d.ts +160 -0
- package/resources/messages/messages.d.ts.map +1 -0
- package/resources/messages/messages.js +54 -0
- package/resources/messages/messages.js.map +1 -0
- package/resources/messages/messages.mjs +49 -0
- package/resources/messages/messages.mjs.map +1 -0
- package/resources/messages/sessions.d.mts +262 -0
- package/resources/messages/sessions.d.mts.map +1 -0
- package/resources/messages/sessions.d.ts +262 -0
- package/resources/messages/sessions.d.ts.map +1 -0
- package/resources/messages/sessions.js +122 -0
- package/resources/messages/sessions.js.map +1 -0
- package/resources/messages/sessions.mjs +118 -0
- package/resources/messages/sessions.mjs.map +1 -0
- package/resources/messages.d.mts +2 -0
- package/resources/messages.d.mts.map +1 -0
- package/resources/messages.d.ts +2 -0
- package/resources/messages.d.ts.map +1 -0
- package/resources/messages.js +6 -0
- package/resources/messages.js.map +1 -0
- package/resources/messages.mjs +3 -0
- package/resources/messages.mjs.map +1 -0
- package/resources/omo.d.mts +98 -0
- package/resources/omo.d.mts.map +1 -0
- package/resources/omo.d.ts +98 -0
- package/resources/omo.d.ts.map +1 -0
- package/resources/omo.js +36 -0
- package/resources/omo.js.map +1 -0
- package/resources/omo.mjs +32 -0
- package/resources/omo.mjs.map +1 -0
- package/resources/schemas.d.mts +667 -76
- package/resources/schemas.d.mts.map +1 -1
- package/resources/schemas.d.ts +667 -76
- package/resources/schemas.d.ts.map +1 -1
- package/resources/schemas.js.map +1 -1
- package/resources/schemas.mjs.map +1 -1
- package/resources/shared.d.mts +671 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +671 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/sync.d.mts +142 -0
- package/resources/sync.d.mts.map +1 -0
- package/resources/sync.d.ts +142 -0
- package/resources/sync.d.ts.map +1 -0
- package/resources/sync.js +36 -0
- package/resources/sync.js.map +1 -0
- package/resources/sync.mjs +32 -0
- package/resources/sync.mjs.map +1 -0
- package/resources/user.d.mts +18 -1
- package/resources/user.d.mts.map +1 -1
- package/resources/user.d.ts +18 -1
- package/resources/user.d.ts.map +1 -1
- package/resources/user.js +11 -0
- package/resources/user.js.map +1 -1
- package/resources/user.mjs +11 -0
- package/resources/user.mjs.map +1 -1
- package/src/client.ts +80 -8
- package/src/internal/parse.ts +6 -0
- package/src/resources/document.ts +17 -4
- package/src/resources/index.ts +21 -0
- package/src/resources/memory.ts +548 -163
- package/src/resources/messages/index.ts +11 -0
- package/src/resources/messages/messages.ts +193 -0
- package/src/resources/messages/sessions.ts +315 -0
- package/src/resources/messages.ts +3 -0
- package/src/resources/omo.ts +132 -0
- package/src/resources/schemas.ts +701 -95
- package/src/resources/shared.ts +752 -0
- package/src/resources/sync.ts +179 -0
- package/src/resources/user.ts +23 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/memory.d.mts
CHANGED
|
@@ -151,7 +151,7 @@ export declare class Memory extends APIResource {
|
|
|
151
151
|
* const searchResponse = await client.memory.get('memory_id');
|
|
152
152
|
* ```
|
|
153
153
|
*/
|
|
154
|
-
get(memoryID: string, options?: RequestOptions): APIPromise<SearchResponse>;
|
|
154
|
+
get(memoryID: string, query?: MemoryGetParams | null | undefined, options?: RequestOptions): APIPromise<SearchResponse>;
|
|
155
155
|
/**
|
|
156
156
|
* Search through memories with authentication required.
|
|
157
157
|
*
|
|
@@ -233,13 +233,58 @@ export interface AddMemory {
|
|
|
233
233
|
*/
|
|
234
234
|
content: string;
|
|
235
235
|
/**
|
|
236
|
-
*
|
|
236
|
+
* Conversation history context for this memory. Use for providing message history
|
|
237
|
+
* when adding a memory. Format: [{role: 'user'|'assistant', content: '...'}]
|
|
237
238
|
*/
|
|
238
239
|
context?: Array<ContextItem> | null;
|
|
239
240
|
/**
|
|
240
|
-
*
|
|
241
|
+
* Your application's user identifier. This is the primary way to identify users.
|
|
242
|
+
* Use this for your app's user IDs (e.g., 'user_alice_123', UUID, email). Papr
|
|
243
|
+
* will automatically resolve or create internal users as needed.
|
|
244
|
+
*/
|
|
245
|
+
external_user_id?: string | null;
|
|
246
|
+
/**
|
|
247
|
+
* @deprecated Graph generation configuration
|
|
241
248
|
*/
|
|
242
249
|
graph_generation?: GraphGeneration | null;
|
|
250
|
+
/**
|
|
251
|
+
* Shorthand DSL for node/edge constraints. Expands to
|
|
252
|
+
* memory_policy.node_constraints and edge_constraints. Formats: - String:
|
|
253
|
+
* 'Task:title' (semantic match on Task.title) - List: ['Task:title',
|
|
254
|
+
* 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}}
|
|
255
|
+
* (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact),
|
|
256
|
+
* 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow
|
|
257
|
+
* syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special:
|
|
258
|
+
* '$this', '$previous', '$context:N' Example:
|
|
259
|
+
* 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
|
|
260
|
+
*/
|
|
261
|
+
link_to?: string | Array<string> | {
|
|
262
|
+
[key: string]: unknown;
|
|
263
|
+
} | null;
|
|
264
|
+
/**
|
|
265
|
+
* Unified memory processing policy.
|
|
266
|
+
*
|
|
267
|
+
* This is the SINGLE source of truth for how a memory should be processed,
|
|
268
|
+
* combining graph generation control AND OMO (Open Memory Object) safety
|
|
269
|
+
* standards.
|
|
270
|
+
*
|
|
271
|
+
* **Graph Generation Modes:**
|
|
272
|
+
*
|
|
273
|
+
* - auto: LLM extracts entities freely (default)
|
|
274
|
+
* - manual: Developer provides exact nodes (no LLM extraction)
|
|
275
|
+
*
|
|
276
|
+
* **OMO Safety Standards:**
|
|
277
|
+
*
|
|
278
|
+
* - consent: How data owner allowed storage (explicit, implicit, terms, none)
|
|
279
|
+
* - risk: Safety assessment (none, sensitive, flagged)
|
|
280
|
+
* - acl: Access control list for read/write permissions
|
|
281
|
+
*
|
|
282
|
+
* **Schema Integration:**
|
|
283
|
+
*
|
|
284
|
+
* - schema_id: Reference a schema that may have its own default memory_policy
|
|
285
|
+
* - Schema-level policies are merged with request-level (request takes precedence)
|
|
286
|
+
*/
|
|
287
|
+
memory_policy?: Shared.MemoryPolicy | null;
|
|
243
288
|
/**
|
|
244
289
|
* Metadata for memory request
|
|
245
290
|
*/
|
|
@@ -255,13 +300,21 @@ export interface AddMemory {
|
|
|
255
300
|
*/
|
|
256
301
|
organization_id?: string | null;
|
|
257
302
|
/**
|
|
258
|
-
*
|
|
303
|
+
* @deprecated DEPRECATED: Use 'memory_policy' instead. Migration options: 1.
|
|
304
|
+
* Specific memory: relationships=[{source: '$this', target: 'mem_123', type:
|
|
305
|
+
* 'FOLLOWS'}] 2. Previous memory: link_to_previous_memory=True 3. Related
|
|
306
|
+
* memories: link_to_related_memories=3
|
|
259
307
|
*/
|
|
260
308
|
relationships_json?: Array<RelationshipItem> | null;
|
|
261
309
|
/**
|
|
262
310
|
* Memory item type; defaults to 'text' if omitted
|
|
263
311
|
*/
|
|
264
312
|
type?: MemoryType;
|
|
313
|
+
/**
|
|
314
|
+
* @deprecated DEPRECATED: Use 'external_user_id' instead. Internal Papr Parse user
|
|
315
|
+
* ID. Most developers should not use this field directly.
|
|
316
|
+
*/
|
|
317
|
+
user_id?: string | null;
|
|
265
318
|
}
|
|
266
319
|
/**
|
|
267
320
|
* Unified response model for add_memory API endpoint (success or error).
|
|
@@ -300,10 +353,6 @@ export interface AutoGraphGeneration {
|
|
|
300
353
|
* Force AI to use this specific schema instead of auto-selecting
|
|
301
354
|
*/
|
|
302
355
|
schema_id?: string | null;
|
|
303
|
-
/**
|
|
304
|
-
* Limit AI to system + one user schema for consistency
|
|
305
|
-
*/
|
|
306
|
-
simple_schema_mode?: boolean;
|
|
307
356
|
}
|
|
308
357
|
export declare namespace AutoGraphGeneration {
|
|
309
358
|
/**
|
|
@@ -497,12 +546,24 @@ export declare namespace ManualGraphGeneration {
|
|
|
497
546
|
* Metadata for memory request
|
|
498
547
|
*/
|
|
499
548
|
export interface MemoryMetadata {
|
|
549
|
+
/**
|
|
550
|
+
* @deprecated DEPRECATED: Use 'memory_policy.acl' at request level instead.
|
|
551
|
+
* Format: {'read': [...], 'write': [...]}.
|
|
552
|
+
*/
|
|
553
|
+
acl?: {
|
|
554
|
+
[key: string]: Array<string>;
|
|
555
|
+
} | null;
|
|
500
556
|
assistantMessage?: string | null;
|
|
501
557
|
/**
|
|
502
558
|
* Memory category based on role. For users: preference, task, goal, fact, context.
|
|
503
559
|
* For assistants: skills, learning, task, goal, fact, context.
|
|
504
560
|
*/
|
|
505
561
|
category?: 'preference' | 'task' | 'goal' | 'fact' | 'context' | 'skills' | 'learning' | null;
|
|
562
|
+
/**
|
|
563
|
+
* @deprecated DEPRECATED: Use 'memory_policy.consent' at request level instead.
|
|
564
|
+
* Values: 'explicit', 'implicit' (default), 'terms', 'none'.
|
|
565
|
+
*/
|
|
566
|
+
consent?: string | null;
|
|
506
567
|
conversationId?: string | null;
|
|
507
568
|
/**
|
|
508
569
|
* ISO datetime when the memory was created
|
|
@@ -517,31 +578,80 @@ export interface MemoryMetadata {
|
|
|
517
578
|
} | null;
|
|
518
579
|
'emoji tags'?: Array<string> | null;
|
|
519
580
|
'emotion tags'?: Array<string> | null;
|
|
581
|
+
/**
|
|
582
|
+
* @deprecated DEPRECATED: Use 'external_user_id' at request level instead. This
|
|
583
|
+
* field will be removed in v2.
|
|
584
|
+
*/
|
|
520
585
|
external_user_id?: string | null;
|
|
586
|
+
/**
|
|
587
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
588
|
+
* instead.
|
|
589
|
+
*/
|
|
521
590
|
external_user_read_access?: Array<string> | null;
|
|
591
|
+
/**
|
|
592
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
593
|
+
* instead.
|
|
594
|
+
*/
|
|
522
595
|
external_user_write_access?: Array<string> | null;
|
|
523
596
|
goalClassificationScores?: Array<number> | null;
|
|
524
597
|
/**
|
|
525
598
|
* Hierarchical structures to enable navigation from broad topics to specific ones
|
|
526
599
|
*/
|
|
527
|
-
hierarchical_structures?: string | null;
|
|
600
|
+
hierarchical_structures?: string | Array<unknown> | null;
|
|
528
601
|
location?: string | null;
|
|
602
|
+
/**
|
|
603
|
+
* @deprecated DEPRECATED: Use 'namespace_id' at request level instead. This field
|
|
604
|
+
* will be removed in v2.
|
|
605
|
+
*/
|
|
529
606
|
namespace_id?: string | null;
|
|
607
|
+
/**
|
|
608
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
609
|
+
* instead.
|
|
610
|
+
*/
|
|
530
611
|
namespace_read_access?: Array<string> | null;
|
|
612
|
+
/**
|
|
613
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
614
|
+
* instead.
|
|
615
|
+
*/
|
|
531
616
|
namespace_write_access?: Array<string> | null;
|
|
617
|
+
/**
|
|
618
|
+
* @deprecated DEPRECATED: Use 'organization_id' at request level instead. This
|
|
619
|
+
* field will be removed in v2.
|
|
620
|
+
*/
|
|
532
621
|
organization_id?: string | null;
|
|
622
|
+
/**
|
|
623
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
624
|
+
* instead.
|
|
625
|
+
*/
|
|
533
626
|
organization_read_access?: Array<string> | null;
|
|
627
|
+
/**
|
|
628
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
629
|
+
* instead.
|
|
630
|
+
*/
|
|
534
631
|
organization_write_access?: Array<string> | null;
|
|
535
632
|
pageId?: string | null;
|
|
536
633
|
post?: string | null;
|
|
537
634
|
relatedGoals?: Array<string> | null;
|
|
538
635
|
relatedSteps?: Array<string> | null;
|
|
539
636
|
relatedUseCases?: Array<string> | null;
|
|
637
|
+
/**
|
|
638
|
+
* @deprecated DEPRECATED: Use 'memory_policy.risk' at request level instead.
|
|
639
|
+
* Values: 'none' (default), 'sensitive', 'flagged'.
|
|
640
|
+
*/
|
|
641
|
+
risk?: string | null;
|
|
540
642
|
/**
|
|
541
643
|
* Role of the message sender
|
|
542
644
|
*/
|
|
543
645
|
role?: 'user' | 'assistant' | null;
|
|
646
|
+
/**
|
|
647
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
648
|
+
* instead.
|
|
649
|
+
*/
|
|
544
650
|
role_read_access?: Array<string> | null;
|
|
651
|
+
/**
|
|
652
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
653
|
+
* instead.
|
|
654
|
+
*/
|
|
545
655
|
role_write_access?: Array<string> | null;
|
|
546
656
|
sessionId?: string | null;
|
|
547
657
|
sourceType?: string | null;
|
|
@@ -553,12 +663,32 @@ export interface MemoryMetadata {
|
|
|
553
663
|
*/
|
|
554
664
|
upload_id?: string | null;
|
|
555
665
|
useCaseClassificationScores?: Array<number> | null;
|
|
666
|
+
/**
|
|
667
|
+
* @deprecated DEPRECATED: Use 'external_user_id' at request level instead. This
|
|
668
|
+
* field will be removed in v2.
|
|
669
|
+
*/
|
|
556
670
|
user_id?: string | null;
|
|
671
|
+
/**
|
|
672
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
673
|
+
* instead.
|
|
674
|
+
*/
|
|
557
675
|
user_read_access?: Array<string> | null;
|
|
676
|
+
/**
|
|
677
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
678
|
+
* instead.
|
|
679
|
+
*/
|
|
558
680
|
user_write_access?: Array<string> | null;
|
|
559
681
|
userMessage?: string | null;
|
|
560
682
|
workspace_id?: string | null;
|
|
683
|
+
/**
|
|
684
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
685
|
+
* instead.
|
|
686
|
+
*/
|
|
561
687
|
workspace_read_access?: Array<string> | null;
|
|
688
|
+
/**
|
|
689
|
+
* INTERNAL: Auto-populated for vector store filtering. Use memory_policy.acl
|
|
690
|
+
* instead.
|
|
691
|
+
*/
|
|
562
692
|
workspace_write_access?: Array<string> | null;
|
|
563
693
|
[k: string]: unknown;
|
|
564
694
|
}
|
|
@@ -616,7 +746,7 @@ export declare namespace SearchResponse {
|
|
|
616
746
|
* Return type for SearchResult
|
|
617
747
|
*/
|
|
618
748
|
interface Data {
|
|
619
|
-
memories: Array<
|
|
749
|
+
memories: Array<Shared.Memory>;
|
|
620
750
|
nodes: Array<Data.Node>;
|
|
621
751
|
/**
|
|
622
752
|
* List of UserGraphSchema IDs used in this response. Use GET /v1/schemas/{id} to
|
|
@@ -625,93 +755,6 @@ export declare namespace SearchResponse {
|
|
|
625
755
|
schemas_used?: Array<string> | null;
|
|
626
756
|
}
|
|
627
757
|
namespace Data {
|
|
628
|
-
/**
|
|
629
|
-
* A memory item in the knowledge base
|
|
630
|
-
*/
|
|
631
|
-
interface Memory {
|
|
632
|
-
id: string;
|
|
633
|
-
acl: {
|
|
634
|
-
[key: string]: {
|
|
635
|
-
[key: string]: boolean;
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
content: string;
|
|
639
|
-
type: string;
|
|
640
|
-
user_id: string;
|
|
641
|
-
/**
|
|
642
|
-
* Memory category based on role
|
|
643
|
-
*/
|
|
644
|
-
category?: string | null;
|
|
645
|
-
context?: Array<MemoryAPI.ContextItem> | null;
|
|
646
|
-
conversation_id?: string;
|
|
647
|
-
createdAt?: string | null;
|
|
648
|
-
current_step?: string | null;
|
|
649
|
-
customMetadata?: {
|
|
650
|
-
[key: string]: unknown;
|
|
651
|
-
} | null;
|
|
652
|
-
/**
|
|
653
|
-
* Full precision (float32) embedding vector from Qdrant. Typically 2560 dimensions
|
|
654
|
-
* for Qwen4B. Used for CoreML/ANE fp16 models.
|
|
655
|
-
*/
|
|
656
|
-
embedding?: Array<number> | null;
|
|
657
|
-
/**
|
|
658
|
-
* Quantized INT8 embedding vector (values -128 to 127). 4x smaller than float32.
|
|
659
|
-
* Default format for efficiency.
|
|
660
|
-
*/
|
|
661
|
-
embedding_int8?: Array<number> | null;
|
|
662
|
-
external_user_id?: string | null;
|
|
663
|
-
external_user_read_access?: Array<string> | null;
|
|
664
|
-
external_user_write_access?: Array<string> | null;
|
|
665
|
-
file_url?: string | null;
|
|
666
|
-
filename?: string | null;
|
|
667
|
-
hierarchical_structures?: string;
|
|
668
|
-
location?: string | null;
|
|
669
|
-
metadata?: string | {
|
|
670
|
-
[key: string]: unknown;
|
|
671
|
-
} | null;
|
|
672
|
-
/**
|
|
673
|
-
* Namespace ID this memory belongs to
|
|
674
|
-
*/
|
|
675
|
-
namespace_id?: string | null;
|
|
676
|
-
namespace_read_access?: Array<string> | null;
|
|
677
|
-
namespace_write_access?: Array<string> | null;
|
|
678
|
-
/**
|
|
679
|
-
* Organization ID that owns this memory
|
|
680
|
-
*/
|
|
681
|
-
organization_id?: string | null;
|
|
682
|
-
organization_read_access?: Array<string> | null;
|
|
683
|
-
organization_write_access?: Array<string> | null;
|
|
684
|
-
page?: string | null;
|
|
685
|
-
page_number?: number | null;
|
|
686
|
-
/**
|
|
687
|
-
* Relevance score from server-side ranking algorithm. Higher scores indicate more
|
|
688
|
-
* relevant memories. Computed as: 60% vector similarity + 30% transition
|
|
689
|
-
* probability + 20% access frequency.
|
|
690
|
-
*/
|
|
691
|
-
relevance_score?: number | null;
|
|
692
|
-
/**
|
|
693
|
-
* Role that generated this memory (user or assistant)
|
|
694
|
-
*/
|
|
695
|
-
role?: string | null;
|
|
696
|
-
role_read_access?: Array<string> | null;
|
|
697
|
-
role_write_access?: Array<string> | null;
|
|
698
|
-
source_document_id?: string | null;
|
|
699
|
-
source_message_id?: string | null;
|
|
700
|
-
source_type?: string;
|
|
701
|
-
source_url?: string;
|
|
702
|
-
steps?: Array<string>;
|
|
703
|
-
tags?: Array<string>;
|
|
704
|
-
title?: string | null;
|
|
705
|
-
topics?: Array<string>;
|
|
706
|
-
total_pages?: number | null;
|
|
707
|
-
updatedAt?: string | null;
|
|
708
|
-
user_read_access?: Array<string> | null;
|
|
709
|
-
user_write_access?: Array<string> | null;
|
|
710
|
-
workspace_id?: string | null;
|
|
711
|
-
workspace_read_access?: Array<string> | null;
|
|
712
|
-
workspace_write_access?: Array<string> | null;
|
|
713
|
-
[k: string]: unknown;
|
|
714
|
-
}
|
|
715
758
|
/**
|
|
716
759
|
* Public-facing node structure - supports both system and custom schema nodes
|
|
717
760
|
*/
|
|
@@ -825,6 +868,48 @@ export interface MemoryUpdateParams {
|
|
|
825
868
|
* Updated context for the memory item
|
|
826
869
|
*/
|
|
827
870
|
context?: Array<ContextItem> | null;
|
|
871
|
+
/**
|
|
872
|
+
* Graph generation configuration
|
|
873
|
+
*/
|
|
874
|
+
graph_generation?: GraphGeneration | null;
|
|
875
|
+
/**
|
|
876
|
+
* Shorthand DSL for node/edge constraints. Expands to
|
|
877
|
+
* memory_policy.node_constraints and edge_constraints. Formats: - String:
|
|
878
|
+
* 'Task:title' (semantic match on Task.title) - List: ['Task:title',
|
|
879
|
+
* 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}}
|
|
880
|
+
* (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact),
|
|
881
|
+
* 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow
|
|
882
|
+
* syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special:
|
|
883
|
+
* '$this', '$previous', '$context:N' Example:
|
|
884
|
+
* 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
|
|
885
|
+
*/
|
|
886
|
+
link_to?: string | Array<string> | {
|
|
887
|
+
[key: string]: unknown;
|
|
888
|
+
} | null;
|
|
889
|
+
/**
|
|
890
|
+
* Unified memory processing policy.
|
|
891
|
+
*
|
|
892
|
+
* This is the SINGLE source of truth for how a memory should be processed,
|
|
893
|
+
* combining graph generation control AND OMO (Open Memory Object) safety
|
|
894
|
+
* standards.
|
|
895
|
+
*
|
|
896
|
+
* **Graph Generation Modes:**
|
|
897
|
+
*
|
|
898
|
+
* - auto: LLM extracts entities freely (default)
|
|
899
|
+
* - manual: Developer provides exact nodes (no LLM extraction)
|
|
900
|
+
*
|
|
901
|
+
* **OMO Safety Standards:**
|
|
902
|
+
*
|
|
903
|
+
* - consent: How data owner allowed storage (explicit, implicit, terms, none)
|
|
904
|
+
* - risk: Safety assessment (none, sensitive, flagged)
|
|
905
|
+
* - acl: Access control list for read/write permissions
|
|
906
|
+
*
|
|
907
|
+
* **Schema Integration:**
|
|
908
|
+
*
|
|
909
|
+
* - schema_id: Reference a schema that may have its own default memory_policy
|
|
910
|
+
* - Schema-level policies are merged with request-level (request takes precedence)
|
|
911
|
+
*/
|
|
912
|
+
memory_policy?: Shared.MemoryPolicy | null;
|
|
828
913
|
/**
|
|
829
914
|
* Metadata for memory request
|
|
830
915
|
*/
|
|
@@ -859,19 +944,74 @@ export interface MemoryAddParams {
|
|
|
859
944
|
* Body param: The content of the memory item you want to add to memory
|
|
860
945
|
*/
|
|
861
946
|
content: string;
|
|
947
|
+
/**
|
|
948
|
+
* Query param: If True, applies holographic neural transforms and stores in
|
|
949
|
+
* holographic collection
|
|
950
|
+
*/
|
|
951
|
+
enable_holographic?: boolean;
|
|
952
|
+
/**
|
|
953
|
+
* Query param: Response format. Use 'omo' for Open Memory Object standard format
|
|
954
|
+
* (portable across platforms).
|
|
955
|
+
*/
|
|
956
|
+
format?: string | null;
|
|
862
957
|
/**
|
|
863
958
|
* Query param: If True, skips adding background tasks for processing
|
|
864
959
|
*/
|
|
865
960
|
skip_background_processing?: boolean;
|
|
866
961
|
/**
|
|
867
|
-
* Body param:
|
|
868
|
-
* memory
|
|
962
|
+
* Body param: Conversation history context for this memory. Use for providing
|
|
963
|
+
* message history when adding a memory. Format: [{role: 'user'|'assistant',
|
|
964
|
+
* content: '...'}]
|
|
869
965
|
*/
|
|
870
966
|
context?: Array<ContextItem> | null;
|
|
967
|
+
/**
|
|
968
|
+
* Body param: Your application's user identifier. This is the primary way to
|
|
969
|
+
* identify users. Use this for your app's user IDs (e.g., 'user_alice_123', UUID,
|
|
970
|
+
* email). Papr will automatically resolve or create internal users as needed.
|
|
971
|
+
*/
|
|
972
|
+
external_user_id?: string | null;
|
|
871
973
|
/**
|
|
872
974
|
* Body param: Graph generation configuration
|
|
873
975
|
*/
|
|
874
976
|
graph_generation?: GraphGeneration | null;
|
|
977
|
+
/**
|
|
978
|
+
* Body param: Shorthand DSL for node/edge constraints. Expands to
|
|
979
|
+
* memory_policy.node_constraints and edge_constraints. Formats: - String:
|
|
980
|
+
* 'Task:title' (semantic match on Task.title) - List: ['Task:title',
|
|
981
|
+
* 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}}
|
|
982
|
+
* (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact),
|
|
983
|
+
* 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow
|
|
984
|
+
* syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special:
|
|
985
|
+
* '$this', '$previous', '$context:N' Example:
|
|
986
|
+
* 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
|
|
987
|
+
*/
|
|
988
|
+
link_to?: string | Array<string> | {
|
|
989
|
+
[key: string]: unknown;
|
|
990
|
+
} | null;
|
|
991
|
+
/**
|
|
992
|
+
* Body param: Unified memory processing policy.
|
|
993
|
+
*
|
|
994
|
+
* This is the SINGLE source of truth for how a memory should be processed,
|
|
995
|
+
* combining graph generation control AND OMO (Open Memory Object) safety
|
|
996
|
+
* standards.
|
|
997
|
+
*
|
|
998
|
+
* **Graph Generation Modes:**
|
|
999
|
+
*
|
|
1000
|
+
* - auto: LLM extracts entities freely (default)
|
|
1001
|
+
* - manual: Developer provides exact nodes (no LLM extraction)
|
|
1002
|
+
*
|
|
1003
|
+
* **OMO Safety Standards:**
|
|
1004
|
+
*
|
|
1005
|
+
* - consent: How data owner allowed storage (explicit, implicit, terms, none)
|
|
1006
|
+
* - risk: Safety assessment (none, sensitive, flagged)
|
|
1007
|
+
* - acl: Access control list for read/write permissions
|
|
1008
|
+
*
|
|
1009
|
+
* **Schema Integration:**
|
|
1010
|
+
*
|
|
1011
|
+
* - schema_id: Reference a schema that may have its own default memory_policy
|
|
1012
|
+
* - Schema-level policies are merged with request-level (request takes precedence)
|
|
1013
|
+
*/
|
|
1014
|
+
memory_policy?: Shared.MemoryPolicy | null;
|
|
875
1015
|
/**
|
|
876
1016
|
* Body param: Metadata for memory request
|
|
877
1017
|
*/
|
|
@@ -887,13 +1027,21 @@ export interface MemoryAddParams {
|
|
|
887
1027
|
*/
|
|
888
1028
|
organization_id?: string | null;
|
|
889
1029
|
/**
|
|
890
|
-
* Body param:
|
|
1030
|
+
* @deprecated Body param: DEPRECATED: Use 'memory_policy' instead. Migration
|
|
1031
|
+
* options: 1. Specific memory: relationships=[{source: '$this', target: 'mem_123',
|
|
1032
|
+
* type: 'FOLLOWS'}] 2. Previous memory: link_to_previous_memory=True 3. Related
|
|
1033
|
+
* memories: link_to_related_memories=3
|
|
891
1034
|
*/
|
|
892
1035
|
relationships_json?: Array<RelationshipItem> | null;
|
|
893
1036
|
/**
|
|
894
1037
|
* Body param: Memory item type; defaults to 'text' if omitted
|
|
895
1038
|
*/
|
|
896
1039
|
type?: MemoryType;
|
|
1040
|
+
/**
|
|
1041
|
+
* @deprecated Body param: DEPRECATED: Use 'external_user_id' instead. Internal
|
|
1042
|
+
* Papr Parse user ID. Most developers should not use this field directly.
|
|
1043
|
+
*/
|
|
1044
|
+
user_id?: string | null;
|
|
897
1045
|
}
|
|
898
1046
|
export interface MemoryAddBatchParams {
|
|
899
1047
|
/**
|
|
@@ -909,14 +1057,53 @@ export interface MemoryAddBatchParams {
|
|
|
909
1057
|
*/
|
|
910
1058
|
batch_size?: number | null;
|
|
911
1059
|
/**
|
|
912
|
-
* Body param:
|
|
913
|
-
*
|
|
1060
|
+
* Body param: Your application's user identifier for all memories in the batch.
|
|
1061
|
+
* This is the primary way to identify users. Papr will automatically resolve or
|
|
1062
|
+
* create internal users as needed.
|
|
914
1063
|
*/
|
|
915
1064
|
external_user_id?: string | null;
|
|
916
1065
|
/**
|
|
917
1066
|
* Body param: Graph generation configuration
|
|
918
1067
|
*/
|
|
919
1068
|
graph_generation?: GraphGeneration | null;
|
|
1069
|
+
/**
|
|
1070
|
+
* Body param: Shorthand DSL for node/edge constraints. Expands to
|
|
1071
|
+
* memory_policy.node_constraints and edge_constraints. Formats: - String:
|
|
1072
|
+
* 'Task:title' (semantic match on Task.title) - List: ['Task:title',
|
|
1073
|
+
* 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}}
|
|
1074
|
+
* (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact),
|
|
1075
|
+
* 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow
|
|
1076
|
+
* syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special:
|
|
1077
|
+
* '$this', '$previous', '$context:N' Example:
|
|
1078
|
+
* 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
|
|
1079
|
+
*/
|
|
1080
|
+
link_to?: string | Array<string> | {
|
|
1081
|
+
[key: string]: unknown;
|
|
1082
|
+
} | null;
|
|
1083
|
+
/**
|
|
1084
|
+
* Body param: Unified memory processing policy.
|
|
1085
|
+
*
|
|
1086
|
+
* This is the SINGLE source of truth for how a memory should be processed,
|
|
1087
|
+
* combining graph generation control AND OMO (Open Memory Object) safety
|
|
1088
|
+
* standards.
|
|
1089
|
+
*
|
|
1090
|
+
* **Graph Generation Modes:**
|
|
1091
|
+
*
|
|
1092
|
+
* - auto: LLM extracts entities freely (default)
|
|
1093
|
+
* - manual: Developer provides exact nodes (no LLM extraction)
|
|
1094
|
+
*
|
|
1095
|
+
* **OMO Safety Standards:**
|
|
1096
|
+
*
|
|
1097
|
+
* - consent: How data owner allowed storage (explicit, implicit, terms, none)
|
|
1098
|
+
* - risk: Safety assessment (none, sensitive, flagged)
|
|
1099
|
+
* - acl: Access control list for read/write permissions
|
|
1100
|
+
*
|
|
1101
|
+
* **Schema Integration:**
|
|
1102
|
+
*
|
|
1103
|
+
* - schema_id: Reference a schema that may have its own default memory_policy
|
|
1104
|
+
* - Schema-level policies are merged with request-level (request takes precedence)
|
|
1105
|
+
*/
|
|
1106
|
+
memory_policy?: Shared.MemoryPolicy | null;
|
|
920
1107
|
/**
|
|
921
1108
|
* Body param: Optional namespace ID for multi-tenant batch memory scoping. When
|
|
922
1109
|
* provided, all memories in the batch are associated with this namespace.
|
|
@@ -928,8 +1115,8 @@ export interface MemoryAddBatchParams {
|
|
|
928
1115
|
*/
|
|
929
1116
|
organization_id?: string | null;
|
|
930
1117
|
/**
|
|
931
|
-
* Body param:
|
|
932
|
-
*
|
|
1118
|
+
* @deprecated Body param: DEPRECATED: Use 'external_user_id' instead. Internal
|
|
1119
|
+
* Papr Parse user ID.
|
|
933
1120
|
*/
|
|
934
1121
|
user_id?: string | null;
|
|
935
1122
|
/**
|
|
@@ -959,6 +1146,23 @@ export interface MemoryDeleteAllParams {
|
|
|
959
1146
|
*/
|
|
960
1147
|
user_id?: string | null;
|
|
961
1148
|
}
|
|
1149
|
+
export interface MemoryGetParams {
|
|
1150
|
+
/**
|
|
1151
|
+
* If true, return 404 if the memory has risk='flagged'. Filters out flagged
|
|
1152
|
+
* content.
|
|
1153
|
+
*/
|
|
1154
|
+
exclude_flagged?: boolean;
|
|
1155
|
+
/**
|
|
1156
|
+
* Maximum risk level allowed. Values: 'none', 'sensitive', 'flagged'. If memory
|
|
1157
|
+
* exceeds this, return 404.
|
|
1158
|
+
*/
|
|
1159
|
+
max_risk?: string | null;
|
|
1160
|
+
/**
|
|
1161
|
+
* If true, return 404 if the memory has consent='none'. Ensures only consented
|
|
1162
|
+
* memories are returned.
|
|
1163
|
+
*/
|
|
1164
|
+
require_consent?: boolean;
|
|
1165
|
+
}
|
|
962
1166
|
export interface MemorySearchParams {
|
|
963
1167
|
/**
|
|
964
1168
|
* Body param: Detailed search query describing what you're looking for. For best
|
|
@@ -1001,11 +1205,20 @@ export interface MemorySearchParams {
|
|
|
1001
1205
|
*/
|
|
1002
1206
|
enable_agentic_graph?: boolean;
|
|
1003
1207
|
/**
|
|
1004
|
-
* Body param:
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1208
|
+
* Body param: Your application's user identifier to filter search results. This is
|
|
1209
|
+
* the primary way to identify users. Use this for your app's user IDs (e.g.,
|
|
1210
|
+
* 'user_alice_123', UUID, email).
|
|
1007
1211
|
*/
|
|
1008
1212
|
external_user_id?: string | null;
|
|
1213
|
+
/**
|
|
1214
|
+
* Body param: Configuration for holographic neural embedding transforms and H-COND
|
|
1215
|
+
* scoring.
|
|
1216
|
+
*
|
|
1217
|
+
* Neural holographic embeddings use 13 brain-inspired frequency bands to encode
|
|
1218
|
+
* hierarchical semantic metadata alongside the base embedding. H-COND (Holographic
|
|
1219
|
+
* CONDitional) scoring uses phase alignment for improved relevance ranking.
|
|
1220
|
+
*/
|
|
1221
|
+
holographic_config?: MemorySearchParams.HolographicConfig | null;
|
|
1009
1222
|
/**
|
|
1010
1223
|
* Body param: Metadata for memory request
|
|
1011
1224
|
*/
|
|
@@ -1015,18 +1228,32 @@ export interface MemorySearchParams {
|
|
|
1015
1228
|
* provided, search is scoped to memories within this namespace.
|
|
1016
1229
|
*/
|
|
1017
1230
|
namespace_id?: string | null;
|
|
1231
|
+
/**
|
|
1232
|
+
* Body param: Filter for Open Memory Object (OMO) safety standards in
|
|
1233
|
+
* search/retrieval.
|
|
1234
|
+
*
|
|
1235
|
+
* Use this to filter search results by consent level and/or risk level.
|
|
1236
|
+
*/
|
|
1237
|
+
omo_filter?: MemorySearchParams.OmoFilter | null;
|
|
1018
1238
|
/**
|
|
1019
1239
|
* Body param: Optional organization ID for multi-tenant search scoping. When
|
|
1020
1240
|
* provided, search is scoped to memories within this organization.
|
|
1021
1241
|
*/
|
|
1022
1242
|
organization_id?: string | null;
|
|
1023
1243
|
/**
|
|
1024
|
-
* Body param:
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
* search pipeline and need
|
|
1244
|
+
* @deprecated Body param: DEPRECATED: Use 'reranking_config' instead. Whether to
|
|
1245
|
+
* enable additional ranking of search results. Default is false because results
|
|
1246
|
+
* are already ranked when using an LLM for search (recommended approach). Only
|
|
1247
|
+
* enable this if you're not using an LLM in your search pipeline and need
|
|
1248
|
+
* additional result ranking. Migration: Replace 'rank_results: true' with
|
|
1249
|
+
* 'reranking_config: {reranking_enabled: true, reranking_provider: "cohere",
|
|
1250
|
+
* reranking_model: "rerank-v3.5"}'
|
|
1028
1251
|
*/
|
|
1029
1252
|
rank_results?: boolean;
|
|
1253
|
+
/**
|
|
1254
|
+
* Body param: Configuration for reranking memory search results
|
|
1255
|
+
*/
|
|
1256
|
+
reranking_config?: MemorySearchParams.RerankingConfig | null;
|
|
1030
1257
|
/**
|
|
1031
1258
|
* Body param: Optional user-defined schema ID to use for this search. If provided,
|
|
1032
1259
|
* this schema (plus system schema) will be used for query generation. If not
|
|
@@ -1035,15 +1262,12 @@ export interface MemorySearchParams {
|
|
|
1035
1262
|
*/
|
|
1036
1263
|
schema_id?: string | null;
|
|
1037
1264
|
/**
|
|
1038
|
-
* Body param:
|
|
1039
|
-
* user schema. This ensures better consistency between add/search operations and
|
|
1040
|
-
* reduces query complexity. Recommended for production use.
|
|
1265
|
+
* Body param: Complete search override specification provided by developer
|
|
1041
1266
|
*/
|
|
1042
|
-
|
|
1267
|
+
search_override?: MemorySearchParams.SearchOverride | null;
|
|
1043
1268
|
/**
|
|
1044
|
-
* Body param:
|
|
1045
|
-
* user.
|
|
1046
|
-
* external_user_id are provided, user_id takes precedence.
|
|
1269
|
+
* @deprecated Body param: DEPRECATED: Use 'external_user_id' instead. Internal
|
|
1270
|
+
* Papr Parse user ID. Most developers should not use this field directly.
|
|
1047
1271
|
*/
|
|
1048
1272
|
user_id?: string | null;
|
|
1049
1273
|
/**
|
|
@@ -1051,7 +1275,162 @@ export interface MemorySearchParams {
|
|
|
1051
1275
|
*/
|
|
1052
1276
|
'Accept-Encoding'?: string;
|
|
1053
1277
|
}
|
|
1278
|
+
export declare namespace MemorySearchParams {
|
|
1279
|
+
/**
|
|
1280
|
+
* Configuration for holographic neural embedding transforms and H-COND scoring.
|
|
1281
|
+
*
|
|
1282
|
+
* Neural holographic embeddings use 13 brain-inspired frequency bands to encode
|
|
1283
|
+
* hierarchical semantic metadata alongside the base embedding. H-COND (Holographic
|
|
1284
|
+
* CONDitional) scoring uses phase alignment for improved relevance ranking.
|
|
1285
|
+
*/
|
|
1286
|
+
interface HolographicConfig {
|
|
1287
|
+
/**
|
|
1288
|
+
* Whether to enable holographic embedding transforms
|
|
1289
|
+
*/
|
|
1290
|
+
enabled?: boolean;
|
|
1291
|
+
/**
|
|
1292
|
+
* Maximum boost to add for high alignment (0.0-0.5)
|
|
1293
|
+
*/
|
|
1294
|
+
hcond_boost_factor?: number;
|
|
1295
|
+
/**
|
|
1296
|
+
* Phase alignment threshold above which to apply boost (0.0-1.0)
|
|
1297
|
+
*/
|
|
1298
|
+
hcond_boost_threshold?: number;
|
|
1299
|
+
/**
|
|
1300
|
+
* Maximum penalty for low alignment (0.0-0.5)
|
|
1301
|
+
*/
|
|
1302
|
+
hcond_penalty_factor?: number;
|
|
1303
|
+
/**
|
|
1304
|
+
* Search mode: 'disabled' (off), 'integrated' (search transformed embeddings),
|
|
1305
|
+
* 'post_search' (fetch then rerank with H-COND)
|
|
1306
|
+
*/
|
|
1307
|
+
search_mode?: 'disabled' | 'integrated' | 'post_search';
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Filter for Open Memory Object (OMO) safety standards in search/retrieval.
|
|
1311
|
+
*
|
|
1312
|
+
* Use this to filter search results by consent level and/or risk level.
|
|
1313
|
+
*/
|
|
1314
|
+
interface OmoFilter {
|
|
1315
|
+
/**
|
|
1316
|
+
* Explicitly exclude memories with these consent levels. Example:
|
|
1317
|
+
* exclude_consent=['none'] filters out all memories without consent.
|
|
1318
|
+
*/
|
|
1319
|
+
exclude_consent?: Array<'explicit' | 'implicit' | 'terms' | 'none'> | null;
|
|
1320
|
+
/**
|
|
1321
|
+
* If true, exclude all flagged content (risk == 'flagged'). Shorthand for
|
|
1322
|
+
* exclude_risk=['flagged'].
|
|
1323
|
+
*/
|
|
1324
|
+
exclude_flagged?: boolean;
|
|
1325
|
+
/**
|
|
1326
|
+
* Explicitly exclude memories with these risk levels. Example:
|
|
1327
|
+
* exclude_risk=['flagged'] filters out all flagged content.
|
|
1328
|
+
*/
|
|
1329
|
+
exclude_risk?: Array<'none' | 'sensitive' | 'flagged'> | null;
|
|
1330
|
+
/**
|
|
1331
|
+
* Post-ingest safety assessment of memory content.
|
|
1332
|
+
*
|
|
1333
|
+
* Aligned with Open Memory Object (OMO) standard.
|
|
1334
|
+
*/
|
|
1335
|
+
max_risk?: 'none' | 'sensitive' | 'flagged' | null;
|
|
1336
|
+
/**
|
|
1337
|
+
* How the data owner allowed this memory to be stored/used.
|
|
1338
|
+
*
|
|
1339
|
+
* Aligned with Open Memory Object (OMO) standard.
|
|
1340
|
+
*/
|
|
1341
|
+
min_consent?: 'explicit' | 'implicit' | 'terms' | 'none' | null;
|
|
1342
|
+
/**
|
|
1343
|
+
* If true, only return memories with explicit consent (consent != 'none').
|
|
1344
|
+
* Shorthand for exclude_consent=['none'].
|
|
1345
|
+
*/
|
|
1346
|
+
require_consent?: boolean;
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Configuration for reranking memory search results
|
|
1350
|
+
*/
|
|
1351
|
+
interface RerankingConfig {
|
|
1352
|
+
/**
|
|
1353
|
+
* Whether to enable reranking of search results
|
|
1354
|
+
*/
|
|
1355
|
+
reranking_enabled?: boolean;
|
|
1356
|
+
/**
|
|
1357
|
+
* Model to use for reranking. OpenAI (LLM): 'gpt-5-nano' (fast reasoning,
|
|
1358
|
+
* default), 'gpt-5-mini' (better quality reasoning). Cohere (cross-encoder):
|
|
1359
|
+
* 'rerank-v3.5' (latest), 'rerank-english-v3.0', 'rerank-multilingual-v3.0'
|
|
1360
|
+
*/
|
|
1361
|
+
reranking_model?: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* Reranking provider: 'openai' (better quality, slower) or 'cohere' (faster,
|
|
1364
|
+
* optimized for reranking)
|
|
1365
|
+
*/
|
|
1366
|
+
reranking_provider?: 'openai' | 'cohere';
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Complete search override specification provided by developer
|
|
1370
|
+
*/
|
|
1371
|
+
interface SearchOverride {
|
|
1372
|
+
/**
|
|
1373
|
+
* Graph pattern to search for (source)-[relationship]->(target)
|
|
1374
|
+
*/
|
|
1375
|
+
pattern: SearchOverride.Pattern;
|
|
1376
|
+
/**
|
|
1377
|
+
* Property filters to apply to the search pattern
|
|
1378
|
+
*/
|
|
1379
|
+
filters?: Array<SearchOverride.Filter>;
|
|
1380
|
+
/**
|
|
1381
|
+
* Specific properties to return. If not specified, returns all properties.
|
|
1382
|
+
*/
|
|
1383
|
+
return_properties?: Array<string> | null;
|
|
1384
|
+
}
|
|
1385
|
+
namespace SearchOverride {
|
|
1386
|
+
/**
|
|
1387
|
+
* Graph pattern to search for (source)-[relationship]->(target)
|
|
1388
|
+
*/
|
|
1389
|
+
interface Pattern {
|
|
1390
|
+
/**
|
|
1391
|
+
* Relationship type (e.g., 'ASSOCIATED_WITH', 'WORKS_FOR'). Must match schema
|
|
1392
|
+
* relationship types.
|
|
1393
|
+
*/
|
|
1394
|
+
relationship_type: string;
|
|
1395
|
+
/**
|
|
1396
|
+
* Source node label (e.g., 'Memory', 'Person', 'Company'). Must match schema node
|
|
1397
|
+
* types.
|
|
1398
|
+
*/
|
|
1399
|
+
source_label: string;
|
|
1400
|
+
/**
|
|
1401
|
+
* Target node label (e.g., 'Person', 'Company', 'Project'). Must match schema node
|
|
1402
|
+
* types.
|
|
1403
|
+
*/
|
|
1404
|
+
target_label: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* Relationship direction: '->' (outgoing), '<-' (incoming), or '-' (bidirectional)
|
|
1407
|
+
*/
|
|
1408
|
+
direction?: string;
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* Property filters for search override
|
|
1412
|
+
*/
|
|
1413
|
+
interface Filter {
|
|
1414
|
+
/**
|
|
1415
|
+
* Node type to filter (e.g., 'Person', 'Memory', 'Company')
|
|
1416
|
+
*/
|
|
1417
|
+
node_type: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* Filter operator: 'CONTAINS', 'EQUALS', 'STARTS_WITH', 'IN'
|
|
1420
|
+
*/
|
|
1421
|
+
operator: string;
|
|
1422
|
+
/**
|
|
1423
|
+
* Property name to filter on (e.g., 'name', 'content', 'role')
|
|
1424
|
+
*/
|
|
1425
|
+
property_name: string;
|
|
1426
|
+
/**
|
|
1427
|
+
* Filter value(s). Use list for 'IN' operator.
|
|
1428
|
+
*/
|
|
1429
|
+
value: string | Array<string> | number | boolean;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1054
1433
|
export declare namespace Memory {
|
|
1055
|
-
export { type AddMemory as AddMemory, type AddMemoryResponse as AddMemoryResponse, type AutoGraphGeneration as AutoGraphGeneration, type BatchMemoryResponse as BatchMemoryResponse, type ContextItem as ContextItem, type GraphGeneration as GraphGeneration, type HTTPValidationError as HTTPValidationError, type ManualGraphGeneration as ManualGraphGeneration, type MemoryMetadata as MemoryMetadata, type MemoryType as MemoryType, type RelationshipItem as RelationshipItem, type SearchResponse as SearchResponse, type MemoryUpdateResponse as MemoryUpdateResponse, type MemoryDeleteResponse as MemoryDeleteResponse, type MemoryUpdateParams as MemoryUpdateParams, type MemoryDeleteParams as MemoryDeleteParams, type MemoryAddParams as MemoryAddParams, type MemoryAddBatchParams as MemoryAddBatchParams, type MemoryDeleteAllParams as MemoryDeleteAllParams, type MemorySearchParams as MemorySearchParams, };
|
|
1434
|
+
export { type AddMemory as AddMemory, type AddMemoryResponse as AddMemoryResponse, type AutoGraphGeneration as AutoGraphGeneration, type BatchMemoryResponse as BatchMemoryResponse, type ContextItem as ContextItem, type GraphGeneration as GraphGeneration, type HTTPValidationError as HTTPValidationError, type ManualGraphGeneration as ManualGraphGeneration, type MemoryMetadata as MemoryMetadata, type MemoryType as MemoryType, type RelationshipItem as RelationshipItem, type SearchResponse as SearchResponse, type MemoryUpdateResponse as MemoryUpdateResponse, type MemoryDeleteResponse as MemoryDeleteResponse, type MemoryUpdateParams as MemoryUpdateParams, type MemoryDeleteParams as MemoryDeleteParams, type MemoryAddParams as MemoryAddParams, type MemoryAddBatchParams as MemoryAddBatchParams, type MemoryDeleteAllParams as MemoryDeleteAllParams, type MemoryGetParams as MemoryGetParams, type MemorySearchParams as MemorySearchParams, };
|
|
1056
1435
|
}
|
|
1057
1436
|
//# sourceMappingURL=memory.d.mts.map
|