@codesoul-co/hypha-memory / memorybank-local-client
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/memorybank-local-client.ts - Exports: 4
Using this module
Use the Memorybank local client module for binding external or local providers to Hypha ports. It exports 1 class, 1 constant, 2 interfaces.
Import from the package entrypoint
ts
import {
MemoryBankLocalClient,
MEMORYBANK_LOCAL_PROTOCOL,
} from '@codesoul-co/hypha-memory';
import type {
MemoryBankClient,
MemoryBankLocalClientOptions,
} 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.
- The 1 constant/enum export provides stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
MemoryBankLocalClient | class | new MemoryBankLocalClient(options: MemoryBankLocalClientOptions): MemoryBankLocalClient | Memory Bank Local Client class with 13 public constructor or member entries; its exact declarations are listed below. |
MEMORYBANK_LOCAL_PROTOCOL | constant | const MEMORYBANK_LOCAL_PROTOCOL: "hypha.memorybank.v1" | MEMORYBANK LOCAL PROTOCOL constant exported by the memorybank-local-client module. |
MemoryBankClient | interface | interface MemoryBankClient extends ExternalMemoryClient | Memory Bank Client interface with 12 public fields or methods. |
MemoryBankLocalClientOptions | interface | interface MemoryBankLocalClientOptions | Memory Bank Local Client Options interface with 7 public fields or methods. |
MemoryBankLocalClient
Memory Bank Local Client class with 13 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MemoryBankLocalClient } from '@codesoul-co/hypha-memory'; - Source module:
memorybank-local-client
Declaration
text
export declare class MemoryBankLocalClient implements MemoryBankClient {
readonly protocol: "hypha.memorybank.v1";
constructor(options: MemoryBankLocalClientOptions);
capabilities(signal?: AbortSignal): 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>;
reconcile(operationId: string, request: MemoryAddRequest, 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(signal?: AbortSignal): 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: MemoryBankLocalClientOptions): MemoryBankLocalClient | 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. |
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. |
protocol | property | readonly protocol: "hypha.memorybank.v1" | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconcile | method | reconcile(operationId: string, request: MemoryAddRequest, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]> | 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. |
MEMORYBANK_LOCAL_PROTOCOL
MEMORYBANK LOCAL PROTOCOL constant exported by the memorybank-local-client module.
- Kind: constant
- Import:
import { MEMORYBANK_LOCAL_PROTOCOL } from '@codesoul-co/hypha-memory'; - Source module:
memorybank-local-client
Declaration
text
export declare const MEMORYBANK_LOCAL_PROTOCOL: "hypha.memorybank.v1";MemoryBankClient
Memory Bank Client interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { MemoryBankClient } from '@codesoul-co/hypha-memory'; - Source module:
memorybank-local-client
Declaration
text
export interface MemoryBankClient extends ExternalMemoryClient {
readonly protocol: string;
reconcile(operationId: string, request: MemoryAddRequest, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]>;
}Contract 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(signal?: AbortSignal): 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. |
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<ManagedMemoryRecord | null> | 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. |
protocol | property | readonly protocol: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconcile | method | reconcile(operationId: string, request: MemoryAddRequest, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]> | 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. |
MemoryBankLocalClientOptions
Memory Bank Local Client Options interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MemoryBankLocalClientOptions } from '@codesoul-co/hypha-memory'; - Source module:
memorybank-local-client
Declaration
text
export interface MemoryBankLocalClientOptions {
baseUrl: string;
fetch?: Mem0HttpFetch;
apiKey?: string;
providerId?: string;
mappingStore?: ExternalMemoryMappingStore;
mappingProfile?: ExternalMemoryMappingRuntimeProfile;
now?: () => Date;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
apiKey | property | apiKey?: 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. |
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. |
now | method | now?(): Date | Public method; parameters and return type are shown in the signature. |
providerId | property | providerId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
