@codesoul-co/hypha-memory / mem0-platform-client
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/mem0-platform-client.ts - Exports: 3
Using this module
Use the Mem0 platform client module for binding external or local providers to Hypha ports. It exports 1 class, 2 interfaces.
Import from the package entrypoint
ts
import {
Mem0PlatformClient,
} from '@codesoul-co/hypha-memory';
import type {
Mem0PlatformClientOptions,
Mem0PlatformEvent,
} from '@codesoul-co/hypha-memory';Usage patterns
- Use the 2 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
Mem0PlatformClient | class | new Mem0PlatformClient(options: Mem0PlatformClientOptions): Mem0PlatformClient | Client for the documented Mem0 Platform v3 additive/search/list protocol. |
Mem0PlatformClientOptions | interface | interface Mem0PlatformClientOptions | Mem0 Platform Client Options interface with 15 public fields or methods. |
Mem0PlatformEvent | interface | interface Mem0PlatformEvent | Mem0 Platform Event interface with 4 public fields or methods. |
Mem0PlatformClient
Client for the documented Mem0 Platform v3 additive/search/list protocol.
- Kind: class
- Import:
import { Mem0PlatformClient } from '@codesoul-co/hypha-memory'; - Source module:
mem0-platform-client
Declaration
text
export declare class Mem0PlatformClient implements ExternalMemoryClient {
constructor(options: Mem0PlatformClientOptions);
capabilities(): Promise<Partial<MemoryManagementCapabilities>>;
add(request: MemoryAddRequest, signal?: AbortSignal): Promise<ManagedMemoryWriteResult>;
search(request: ManagedMemorySearchRequest, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]>;
get(request: MemoryGetRequest, signal?: AbortSignal): Promise<import("./contracts").ManagedMemoryRecord<unknown> | null>;
list(request: MemoryListRequest, signal?: AbortSignal): Promise<MemoryListResult>;
update(request: ManagedMemoryUpdateRequest, signal?: AbortSignal): Promise<ManagedMemoryWriteResult>;
delete(request: ManagedMemoryDeleteRequest, signal?: AbortSignal): Promise<ManagedMemoryDeleteResult>;
history(request: MemoryHistoryRequest, signal?: AbortSignal): Promise<MemoryVersion[]>;
health(signal?: AbortSignal): Promise<ProviderHealth>;
close(): Promise<void>;
getEvent(eventId: string, signal?: AbortSignal): Promise<Mem0PlatformEvent>;
resumeEvent(operationId: string, signal?: AbortSignal): Promise<Mem0PlatformEvent | null>;
reconcile(operationId: string, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
add | method | add(request: MemoryAddRequest, signal?: AbortSignal): Promise<ManagedMemoryWriteResult> | Public method; parameters and return type are shown in the signature. |
capabilities | method | capabilities(): Promise<Partial<MemoryManagementCapabilities>> | Public method; parameters and return type are shown in the signature. |
close | method | close(): Promise<void> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options: Mem0PlatformClientOptions): Mem0PlatformClient | Creates an instance of this class. |
delete | method | delete(request: ManagedMemoryDeleteRequest, signal?: AbortSignal): Promise<ManagedMemoryDeleteResult> | Public method; parameters and return type are shown in the signature. |
get | method | get(request: MemoryGetRequest, signal?: AbortSignal): Promise<import("./contracts").ManagedMemoryRecord<unknown> | null> | Public method; parameters and return type are shown in the signature. |
getEvent | method | getEvent(eventId: string, signal?: AbortSignal): Promise<Mem0PlatformEvent> | Public method; parameters and return type are shown in the signature. |
health | method | health(signal?: AbortSignal): Promise<ProviderHealth> | Public method; parameters and return type are shown in the signature. |
history | method | history(request: MemoryHistoryRequest, signal?: AbortSignal): Promise<MemoryVersion[]> | Public method; parameters and return type are shown in the signature. |
list | method | list(request: MemoryListRequest, signal?: AbortSignal): Promise<MemoryListResult> | Public method; parameters and return type are shown in the signature. |
reconcile | method | reconcile(operationId: string, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]> | Public method; parameters and return type are shown in the signature. |
resumeEvent | method | resumeEvent(operationId: string, signal?: AbortSignal): Promise<Mem0PlatformEvent | null> | Public method; parameters and return type are shown in the signature. |
search | method | search(request: ManagedMemorySearchRequest, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]> | Public method; parameters and return type are shown in the signature. |
update | method | update(request: ManagedMemoryUpdateRequest, signal?: AbortSignal): Promise<ManagedMemoryWriteResult> | Public method; parameters and return type are shown in the signature. |
Mem0PlatformClientOptions
Mem0 Platform Client Options interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { Mem0PlatformClientOptions } from '@codesoul-co/hypha-memory'; - Source module:
mem0-platform-client
Declaration
text
export interface Mem0PlatformClientOptions {
baseUrl?: string;
apiToken?: string;
credentialProvider?: RenewableCredentialProvider;
fetch?: Mem0HttpFetch;
providerId?: string;
mappingStore?: ExternalMemoryMappingStore;
mappingProfile?: ExternalMemoryMappingRuntimeProfile;
operationStore?: ExternalProviderOperationStore;
operationDeadlineMs?: number;
maxOperationAttempts?: number;
providerVersion?: string;
expectedProviderVersion?: string;
expectedCapabilities?: Partial<MemoryManagementCapabilities>;
now?: () => Date;
allowInsecureForTests?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowInsecureForTests | property | allowInsecureForTests?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
apiToken | property | apiToken?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
baseUrl | property | baseUrl?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
credentialProvider | property | credentialProvider?: RenewableCredentialProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedCapabilities | property | expectedCapabilities?: Partial<MemoryManagementCapabilities> | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedProviderVersion | property | expectedProviderVersion?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fetch | method | fetch?(url: string, init?: { method?: string; headers?: Record<string, string>; body?: string; signal?: AbortSignal; }): Promise<import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/mem0-rest-client").Mem0HttpResponse> | Public method; parameters and return type are shown in the signature. |
mappingProfile | property | mappingProfile?: ExternalMemoryMappingRuntimeProfile | Public property; its type, readonly modifier and optionality are shown in the signature. |
mappingStore | property | mappingStore?: ExternalMemoryMappingStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxOperationAttempts | property | maxOperationAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): Date | Public method; parameters and return type are shown in the signature. |
operationDeadlineMs | property | operationDeadlineMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationStore | property | operationStore?: ExternalProviderOperationStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerId | property | providerId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerVersion | property | providerVersion?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
Mem0PlatformEvent
Mem0 Platform Event interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { Mem0PlatformEvent } from '@codesoul-co/hypha-memory'; - Source module:
mem0-platform-client
Declaration
text
export interface Mem0PlatformEvent {
id: string;
status: 'PENDING' | 'RUNNING' | 'FAILED' | 'SUCCEEDED';
results?: unknown[];
payload?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
payload | property | payload?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
results | property | results?: unknown[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "PENDING" | "RUNNING" | "FAILED" | "SUCCEEDED" | Public property; its type, readonly modifier and optionality are shown in the signature. |
