@memnexus-ai/typescript-sdk 1.16.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +51 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +172 -1
- package/dist/index.d.ts +172 -1
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -751,6 +751,155 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
|
|
|
751
751
|
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
752
752
|
};
|
|
753
753
|
}>>;
|
|
754
|
+
declare const batchGetMemoriesRequest: z.ZodObject<{
|
|
755
|
+
/** Array of memory IDs to retrieve */
|
|
756
|
+
ids: z.ZodArray<z.ZodString, "many">;
|
|
757
|
+
}, "strip", z.ZodTypeAny, {
|
|
758
|
+
ids: string[];
|
|
759
|
+
}, {
|
|
760
|
+
ids: string[];
|
|
761
|
+
}>;
|
|
762
|
+
declare const batchGetMemoriesMeta: z.ZodObject<{
|
|
763
|
+
/** Number of IDs requested */
|
|
764
|
+
requested: z.ZodNumber;
|
|
765
|
+
/** Number of memories found */
|
|
766
|
+
found: z.ZodNumber;
|
|
767
|
+
/** IDs that were not found */
|
|
768
|
+
missing: z.ZodArray<z.ZodString, "many">;
|
|
769
|
+
}, "strip", z.ZodTypeAny, {
|
|
770
|
+
requested: number;
|
|
771
|
+
found: number;
|
|
772
|
+
missing: string[];
|
|
773
|
+
}, {
|
|
774
|
+
requested: number;
|
|
775
|
+
found: number;
|
|
776
|
+
missing: string[];
|
|
777
|
+
}>;
|
|
778
|
+
/**
|
|
779
|
+
* Response from batch memory retrieval
|
|
780
|
+
*/
|
|
781
|
+
declare const batchGetMemoriesResponse: z.ZodLazy<z.ZodObject<{
|
|
782
|
+
data: z.ZodArray<z.ZodObject<{
|
|
783
|
+
/** Unique memory identifier */
|
|
784
|
+
id: z.ZodString;
|
|
785
|
+
/** Memory content */
|
|
786
|
+
content: z.ZodString;
|
|
787
|
+
/** Type of memory */
|
|
788
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
789
|
+
/** Context or domain of the memory */
|
|
790
|
+
context: z.ZodOptional<z.ZodString>;
|
|
791
|
+
/** Associated topics */
|
|
792
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
793
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
794
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
795
|
+
/** Event time (when the event actually occurred in reality) */
|
|
796
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
797
|
+
/** Validity start time (when this fact becomes valid) */
|
|
798
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
799
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
800
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
801
|
+
/** Creation timestamp */
|
|
802
|
+
createdAt: z.ZodString;
|
|
803
|
+
/** Last update timestamp */
|
|
804
|
+
updatedAt: z.ZodString;
|
|
805
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
806
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
807
|
+
/** Basis for the confidence score */
|
|
808
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
809
|
+
/** Effective state of the memory in the narrative */
|
|
810
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
811
|
+
}, "strip", z.ZodTypeAny, {
|
|
812
|
+
id: string;
|
|
813
|
+
content: string;
|
|
814
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
815
|
+
createdAt: string;
|
|
816
|
+
updatedAt: string;
|
|
817
|
+
context?: string | undefined;
|
|
818
|
+
topics?: string[] | undefined;
|
|
819
|
+
timestamp?: string | undefined;
|
|
820
|
+
eventTime?: string | undefined;
|
|
821
|
+
validFrom?: string | undefined;
|
|
822
|
+
validTo?: string | null | undefined;
|
|
823
|
+
confidenceScore?: number | undefined;
|
|
824
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
825
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
826
|
+
}, {
|
|
827
|
+
id: string;
|
|
828
|
+
content: string;
|
|
829
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
830
|
+
createdAt: string;
|
|
831
|
+
updatedAt: string;
|
|
832
|
+
context?: string | undefined;
|
|
833
|
+
topics?: string[] | undefined;
|
|
834
|
+
timestamp?: string | undefined;
|
|
835
|
+
eventTime?: string | undefined;
|
|
836
|
+
validFrom?: string | undefined;
|
|
837
|
+
validTo?: string | null | undefined;
|
|
838
|
+
confidenceScore?: number | undefined;
|
|
839
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
840
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
841
|
+
}>, "many">;
|
|
842
|
+
meta: z.ZodObject<{
|
|
843
|
+
/** Number of IDs requested */
|
|
844
|
+
requested: z.ZodNumber;
|
|
845
|
+
/** Number of memories found */
|
|
846
|
+
found: z.ZodNumber;
|
|
847
|
+
/** IDs that were not found */
|
|
848
|
+
missing: z.ZodArray<z.ZodString, "many">;
|
|
849
|
+
}, "strip", z.ZodTypeAny, {
|
|
850
|
+
requested: number;
|
|
851
|
+
found: number;
|
|
852
|
+
missing: string[];
|
|
853
|
+
}, {
|
|
854
|
+
requested: number;
|
|
855
|
+
found: number;
|
|
856
|
+
missing: string[];
|
|
857
|
+
}>;
|
|
858
|
+
}, "strip", z.ZodTypeAny, {
|
|
859
|
+
data: {
|
|
860
|
+
id: string;
|
|
861
|
+
content: string;
|
|
862
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
863
|
+
createdAt: string;
|
|
864
|
+
updatedAt: string;
|
|
865
|
+
context?: string | undefined;
|
|
866
|
+
topics?: string[] | undefined;
|
|
867
|
+
timestamp?: string | undefined;
|
|
868
|
+
eventTime?: string | undefined;
|
|
869
|
+
validFrom?: string | undefined;
|
|
870
|
+
validTo?: string | null | undefined;
|
|
871
|
+
confidenceScore?: number | undefined;
|
|
872
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
873
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
874
|
+
}[];
|
|
875
|
+
meta: {
|
|
876
|
+
requested: number;
|
|
877
|
+
found: number;
|
|
878
|
+
missing: string[];
|
|
879
|
+
};
|
|
880
|
+
}, {
|
|
881
|
+
data: {
|
|
882
|
+
id: string;
|
|
883
|
+
content: string;
|
|
884
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
885
|
+
createdAt: string;
|
|
886
|
+
updatedAt: string;
|
|
887
|
+
context?: string | undefined;
|
|
888
|
+
topics?: string[] | undefined;
|
|
889
|
+
timestamp?: string | undefined;
|
|
890
|
+
eventTime?: string | undefined;
|
|
891
|
+
validFrom?: string | undefined;
|
|
892
|
+
validTo?: string | null | undefined;
|
|
893
|
+
confidenceScore?: number | undefined;
|
|
894
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
895
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
896
|
+
}[];
|
|
897
|
+
meta: {
|
|
898
|
+
requested: number;
|
|
899
|
+
found: number;
|
|
900
|
+
missing: string[];
|
|
901
|
+
};
|
|
902
|
+
}>>;
|
|
754
903
|
declare const graphRAGQueryRequest: z.ZodObject<{
|
|
755
904
|
/** GraphRAG query string */
|
|
756
905
|
query: z.ZodString;
|
|
@@ -3007,6 +3156,12 @@ type RelatedMemoryResult = z.infer<typeof relatedMemoryResult>;
|
|
|
3007
3156
|
* Response from getting a memory by ID
|
|
3008
3157
|
*/
|
|
3009
3158
|
type GetMemoryResponse = z.infer<typeof getMemoryResponse>;
|
|
3159
|
+
type BatchGetMemoriesRequest = z.infer<typeof batchGetMemoriesRequest>;
|
|
3160
|
+
type BatchGetMemoriesMeta = z.infer<typeof batchGetMemoriesMeta>;
|
|
3161
|
+
/**
|
|
3162
|
+
* Response from batch memory retrieval
|
|
3163
|
+
*/
|
|
3164
|
+
type BatchGetMemoriesResponse = z.infer<typeof batchGetMemoriesResponse>;
|
|
3010
3165
|
type GraphRAGQueryRequest = z.infer<typeof graphRAGQueryRequest>;
|
|
3011
3166
|
type GraphRAGQueryResponse = z.infer<typeof graphRAGQueryResponse>;
|
|
3012
3167
|
type Conversation = z.infer<typeof conversation>;
|
|
@@ -3630,6 +3785,22 @@ declare class MemoriesService extends BaseService {
|
|
|
3630
3785
|
};
|
|
3631
3786
|
temporalMetadata: TemporalMetadata;
|
|
3632
3787
|
}>>;
|
|
3788
|
+
/**
|
|
3789
|
+
* Get multiple memories by IDs
|
|
3790
|
+
* Retrieve multiple memories by their IDs in a single request.
|
|
3791
|
+
More efficient than making multiple individual GET requests.
|
|
3792
|
+
|
|
3793
|
+
Returns memories in the order requested, with metadata about
|
|
3794
|
+
which IDs were found or missing.
|
|
3795
|
+
|
|
3796
|
+
* @param body - Request body
|
|
3797
|
+
*/
|
|
3798
|
+
getMemoriesBatch(body: {
|
|
3799
|
+
ids: string[];
|
|
3800
|
+
}): Promise<HttpResponse<{
|
|
3801
|
+
data: Memory[];
|
|
3802
|
+
meta: BatchGetMemoriesMeta;
|
|
3803
|
+
}>>;
|
|
3633
3804
|
/**
|
|
3634
3805
|
* Find similar memories
|
|
3635
3806
|
* Find memories that are semantically similar to the given memory.
|
|
@@ -4477,4 +4648,4 @@ declare class Memnexus {
|
|
|
4477
4648
|
setEnvironment(environment: Environment): void;
|
|
4478
4649
|
}
|
|
4479
4650
|
|
|
4480
|
-
export { type AddMemoryToNarrativeRequest, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, BehaviorService, CommunitiesService, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type Entity, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, type ListNarrativesResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type MergeCommunitiesRequest, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, community, conversation, createArtifactRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, Memnexus as default, entity, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, listNarrativesResponse, memory, memoryRelationship, memoryRelationshipsResponse, mergeCommunitiesRequest, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNarrativeRequest, user, userUsage };
|
|
4651
|
+
export { type AddMemoryToNarrativeRequest, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, BehaviorService, CommunitiesService, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type Entity, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, type ListNarrativesResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type MergeCommunitiesRequest, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, batchGetMemoriesMeta, batchGetMemoriesRequest, batchGetMemoriesResponse, community, conversation, createArtifactRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, Memnexus as default, entity, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, listNarrativesResponse, memory, memoryRelationship, memoryRelationshipsResponse, mergeCommunitiesRequest, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNarrativeRequest, user, userUsage };
|
package/dist/index.d.ts
CHANGED
|
@@ -751,6 +751,155 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
|
|
|
751
751
|
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
752
752
|
};
|
|
753
753
|
}>>;
|
|
754
|
+
declare const batchGetMemoriesRequest: z.ZodObject<{
|
|
755
|
+
/** Array of memory IDs to retrieve */
|
|
756
|
+
ids: z.ZodArray<z.ZodString, "many">;
|
|
757
|
+
}, "strip", z.ZodTypeAny, {
|
|
758
|
+
ids: string[];
|
|
759
|
+
}, {
|
|
760
|
+
ids: string[];
|
|
761
|
+
}>;
|
|
762
|
+
declare const batchGetMemoriesMeta: z.ZodObject<{
|
|
763
|
+
/** Number of IDs requested */
|
|
764
|
+
requested: z.ZodNumber;
|
|
765
|
+
/** Number of memories found */
|
|
766
|
+
found: z.ZodNumber;
|
|
767
|
+
/** IDs that were not found */
|
|
768
|
+
missing: z.ZodArray<z.ZodString, "many">;
|
|
769
|
+
}, "strip", z.ZodTypeAny, {
|
|
770
|
+
requested: number;
|
|
771
|
+
found: number;
|
|
772
|
+
missing: string[];
|
|
773
|
+
}, {
|
|
774
|
+
requested: number;
|
|
775
|
+
found: number;
|
|
776
|
+
missing: string[];
|
|
777
|
+
}>;
|
|
778
|
+
/**
|
|
779
|
+
* Response from batch memory retrieval
|
|
780
|
+
*/
|
|
781
|
+
declare const batchGetMemoriesResponse: z.ZodLazy<z.ZodObject<{
|
|
782
|
+
data: z.ZodArray<z.ZodObject<{
|
|
783
|
+
/** Unique memory identifier */
|
|
784
|
+
id: z.ZodString;
|
|
785
|
+
/** Memory content */
|
|
786
|
+
content: z.ZodString;
|
|
787
|
+
/** Type of memory */
|
|
788
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
789
|
+
/** Context or domain of the memory */
|
|
790
|
+
context: z.ZodOptional<z.ZodString>;
|
|
791
|
+
/** Associated topics */
|
|
792
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
793
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
794
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
795
|
+
/** Event time (when the event actually occurred in reality) */
|
|
796
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
797
|
+
/** Validity start time (when this fact becomes valid) */
|
|
798
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
799
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
800
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
801
|
+
/** Creation timestamp */
|
|
802
|
+
createdAt: z.ZodString;
|
|
803
|
+
/** Last update timestamp */
|
|
804
|
+
updatedAt: z.ZodString;
|
|
805
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
806
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
807
|
+
/** Basis for the confidence score */
|
|
808
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
809
|
+
/** Effective state of the memory in the narrative */
|
|
810
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
811
|
+
}, "strip", z.ZodTypeAny, {
|
|
812
|
+
id: string;
|
|
813
|
+
content: string;
|
|
814
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
815
|
+
createdAt: string;
|
|
816
|
+
updatedAt: string;
|
|
817
|
+
context?: string | undefined;
|
|
818
|
+
topics?: string[] | undefined;
|
|
819
|
+
timestamp?: string | undefined;
|
|
820
|
+
eventTime?: string | undefined;
|
|
821
|
+
validFrom?: string | undefined;
|
|
822
|
+
validTo?: string | null | undefined;
|
|
823
|
+
confidenceScore?: number | undefined;
|
|
824
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
825
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
826
|
+
}, {
|
|
827
|
+
id: string;
|
|
828
|
+
content: string;
|
|
829
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
830
|
+
createdAt: string;
|
|
831
|
+
updatedAt: string;
|
|
832
|
+
context?: string | undefined;
|
|
833
|
+
topics?: string[] | undefined;
|
|
834
|
+
timestamp?: string | undefined;
|
|
835
|
+
eventTime?: string | undefined;
|
|
836
|
+
validFrom?: string | undefined;
|
|
837
|
+
validTo?: string | null | undefined;
|
|
838
|
+
confidenceScore?: number | undefined;
|
|
839
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
840
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
841
|
+
}>, "many">;
|
|
842
|
+
meta: z.ZodObject<{
|
|
843
|
+
/** Number of IDs requested */
|
|
844
|
+
requested: z.ZodNumber;
|
|
845
|
+
/** Number of memories found */
|
|
846
|
+
found: z.ZodNumber;
|
|
847
|
+
/** IDs that were not found */
|
|
848
|
+
missing: z.ZodArray<z.ZodString, "many">;
|
|
849
|
+
}, "strip", z.ZodTypeAny, {
|
|
850
|
+
requested: number;
|
|
851
|
+
found: number;
|
|
852
|
+
missing: string[];
|
|
853
|
+
}, {
|
|
854
|
+
requested: number;
|
|
855
|
+
found: number;
|
|
856
|
+
missing: string[];
|
|
857
|
+
}>;
|
|
858
|
+
}, "strip", z.ZodTypeAny, {
|
|
859
|
+
data: {
|
|
860
|
+
id: string;
|
|
861
|
+
content: string;
|
|
862
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
863
|
+
createdAt: string;
|
|
864
|
+
updatedAt: string;
|
|
865
|
+
context?: string | undefined;
|
|
866
|
+
topics?: string[] | undefined;
|
|
867
|
+
timestamp?: string | undefined;
|
|
868
|
+
eventTime?: string | undefined;
|
|
869
|
+
validFrom?: string | undefined;
|
|
870
|
+
validTo?: string | null | undefined;
|
|
871
|
+
confidenceScore?: number | undefined;
|
|
872
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
873
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
874
|
+
}[];
|
|
875
|
+
meta: {
|
|
876
|
+
requested: number;
|
|
877
|
+
found: number;
|
|
878
|
+
missing: string[];
|
|
879
|
+
};
|
|
880
|
+
}, {
|
|
881
|
+
data: {
|
|
882
|
+
id: string;
|
|
883
|
+
content: string;
|
|
884
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
885
|
+
createdAt: string;
|
|
886
|
+
updatedAt: string;
|
|
887
|
+
context?: string | undefined;
|
|
888
|
+
topics?: string[] | undefined;
|
|
889
|
+
timestamp?: string | undefined;
|
|
890
|
+
eventTime?: string | undefined;
|
|
891
|
+
validFrom?: string | undefined;
|
|
892
|
+
validTo?: string | null | undefined;
|
|
893
|
+
confidenceScore?: number | undefined;
|
|
894
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
895
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
896
|
+
}[];
|
|
897
|
+
meta: {
|
|
898
|
+
requested: number;
|
|
899
|
+
found: number;
|
|
900
|
+
missing: string[];
|
|
901
|
+
};
|
|
902
|
+
}>>;
|
|
754
903
|
declare const graphRAGQueryRequest: z.ZodObject<{
|
|
755
904
|
/** GraphRAG query string */
|
|
756
905
|
query: z.ZodString;
|
|
@@ -3007,6 +3156,12 @@ type RelatedMemoryResult = z.infer<typeof relatedMemoryResult>;
|
|
|
3007
3156
|
* Response from getting a memory by ID
|
|
3008
3157
|
*/
|
|
3009
3158
|
type GetMemoryResponse = z.infer<typeof getMemoryResponse>;
|
|
3159
|
+
type BatchGetMemoriesRequest = z.infer<typeof batchGetMemoriesRequest>;
|
|
3160
|
+
type BatchGetMemoriesMeta = z.infer<typeof batchGetMemoriesMeta>;
|
|
3161
|
+
/**
|
|
3162
|
+
* Response from batch memory retrieval
|
|
3163
|
+
*/
|
|
3164
|
+
type BatchGetMemoriesResponse = z.infer<typeof batchGetMemoriesResponse>;
|
|
3010
3165
|
type GraphRAGQueryRequest = z.infer<typeof graphRAGQueryRequest>;
|
|
3011
3166
|
type GraphRAGQueryResponse = z.infer<typeof graphRAGQueryResponse>;
|
|
3012
3167
|
type Conversation = z.infer<typeof conversation>;
|
|
@@ -3630,6 +3785,22 @@ declare class MemoriesService extends BaseService {
|
|
|
3630
3785
|
};
|
|
3631
3786
|
temporalMetadata: TemporalMetadata;
|
|
3632
3787
|
}>>;
|
|
3788
|
+
/**
|
|
3789
|
+
* Get multiple memories by IDs
|
|
3790
|
+
* Retrieve multiple memories by their IDs in a single request.
|
|
3791
|
+
More efficient than making multiple individual GET requests.
|
|
3792
|
+
|
|
3793
|
+
Returns memories in the order requested, with metadata about
|
|
3794
|
+
which IDs were found or missing.
|
|
3795
|
+
|
|
3796
|
+
* @param body - Request body
|
|
3797
|
+
*/
|
|
3798
|
+
getMemoriesBatch(body: {
|
|
3799
|
+
ids: string[];
|
|
3800
|
+
}): Promise<HttpResponse<{
|
|
3801
|
+
data: Memory[];
|
|
3802
|
+
meta: BatchGetMemoriesMeta;
|
|
3803
|
+
}>>;
|
|
3633
3804
|
/**
|
|
3634
3805
|
* Find similar memories
|
|
3635
3806
|
* Find memories that are semantically similar to the given memory.
|
|
@@ -4477,4 +4648,4 @@ declare class Memnexus {
|
|
|
4477
4648
|
setEnvironment(environment: Environment): void;
|
|
4478
4649
|
}
|
|
4479
4650
|
|
|
4480
|
-
export { type AddMemoryToNarrativeRequest, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, BehaviorService, CommunitiesService, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type Entity, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, type ListNarrativesResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type MergeCommunitiesRequest, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, community, conversation, createArtifactRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, Memnexus as default, entity, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, listNarrativesResponse, memory, memoryRelationship, memoryRelationshipsResponse, mergeCommunitiesRequest, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNarrativeRequest, user, userUsage };
|
|
4651
|
+
export { type AddMemoryToNarrativeRequest, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, BehaviorService, CommunitiesService, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type Entity, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, type ListNarrativesResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type MergeCommunitiesRequest, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, batchGetMemoriesMeta, batchGetMemoriesRequest, batchGetMemoriesResponse, community, conversation, createArtifactRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, Memnexus as default, entity, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, listNarrativesResponse, memory, memoryRelationship, memoryRelationshipsResponse, mergeCommunitiesRequest, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNarrativeRequest, user, userUsage };
|
package/dist/index.js
CHANGED
|
@@ -1851,6 +1851,35 @@ var MemoriesService = class extends BaseService {
|
|
|
1851
1851
|
}
|
|
1852
1852
|
return this.client.call(request);
|
|
1853
1853
|
}
|
|
1854
|
+
/**
|
|
1855
|
+
* Get multiple memories by IDs
|
|
1856
|
+
* Retrieve multiple memories by their IDs in a single request.
|
|
1857
|
+
More efficient than making multiple individual GET requests.
|
|
1858
|
+
|
|
1859
|
+
Returns memories in the order requested, with metadata about
|
|
1860
|
+
which IDs were found or missing.
|
|
1861
|
+
|
|
1862
|
+
* @param body - Request body
|
|
1863
|
+
*/
|
|
1864
|
+
async getMemoriesBatch(body) {
|
|
1865
|
+
const request = new Request({
|
|
1866
|
+
baseUrl: this.config.baseUrl || "http://localhost:3000",
|
|
1867
|
+
method: "POST",
|
|
1868
|
+
path: "/api/memories/batch",
|
|
1869
|
+
config: this.config,
|
|
1870
|
+
retry: {
|
|
1871
|
+
attempts: 3,
|
|
1872
|
+
delayMs: 150,
|
|
1873
|
+
maxDelayMs: 5e3,
|
|
1874
|
+
jitterMs: 50,
|
|
1875
|
+
backoffFactor: 2
|
|
1876
|
+
}
|
|
1877
|
+
});
|
|
1878
|
+
if (body !== void 0) {
|
|
1879
|
+
request.addBody(body);
|
|
1880
|
+
}
|
|
1881
|
+
return this.client.call(request);
|
|
1882
|
+
}
|
|
1854
1883
|
/**
|
|
1855
1884
|
* Find similar memories
|
|
1856
1885
|
* Find memories that are semantically similar to the given memory.
|
|
@@ -3645,6 +3674,22 @@ var relatedMemoryResult = z.object({
|
|
|
3645
3674
|
var getMemoryResponse = z.lazy(() => z.object({
|
|
3646
3675
|
data: memory
|
|
3647
3676
|
}));
|
|
3677
|
+
var batchGetMemoriesRequest = z.object({
|
|
3678
|
+
/** Array of memory IDs to retrieve */
|
|
3679
|
+
ids: z.array(z.string().uuid()).min(1).max(100)
|
|
3680
|
+
});
|
|
3681
|
+
var batchGetMemoriesMeta = z.object({
|
|
3682
|
+
/** Number of IDs requested */
|
|
3683
|
+
requested: z.number(),
|
|
3684
|
+
/** Number of memories found */
|
|
3685
|
+
found: z.number(),
|
|
3686
|
+
/** IDs that were not found */
|
|
3687
|
+
missing: z.array(z.string())
|
|
3688
|
+
});
|
|
3689
|
+
var batchGetMemoriesResponse = z.lazy(() => z.object({
|
|
3690
|
+
data: z.array(memory),
|
|
3691
|
+
meta: batchGetMemoriesMeta
|
|
3692
|
+
}));
|
|
3648
3693
|
var graphRAGQueryRequest = z.object({
|
|
3649
3694
|
/** GraphRAG query string */
|
|
3650
3695
|
query: z.string().min(1),
|
|
@@ -4326,6 +4371,9 @@ export {
|
|
|
4326
4371
|
addMemoryToNarrativeRequest,
|
|
4327
4372
|
apiKey,
|
|
4328
4373
|
artifact,
|
|
4374
|
+
batchGetMemoriesMeta,
|
|
4375
|
+
batchGetMemoriesRequest,
|
|
4376
|
+
batchGetMemoriesResponse,
|
|
4329
4377
|
community,
|
|
4330
4378
|
conversation,
|
|
4331
4379
|
createArtifactRequest,
|