Skip to content

@codesoul-co/hypha-memory / native-memory

Using this module

Use the Native memory module for using the public contracts and operations for this capability boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

ts
import {
  NativeMemoryManagementProvider,
} from '@codesoul-co/hypha-memory';

import type {
  NativeMemoryProviderOptions,
} from '@codesoul-co/hypha-memory';

Usage patterns

  • Use the 1 type/interface export 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

SymbolKindSignatureDescription
NativeMemoryManagementProviderclassnew NativeMemoryManagementProvider(options: NativeMemoryProviderOptions): NativeMemoryManagementProviderNative Memory Management Provider class with 16 public constructor or member entries; its exact declarations are listed below.
NativeMemoryProviderOptionsinterfaceinterface NativeMemoryProviderOptionsNative Memory Provider Options interface with 8 public fields or methods.

NativeMemoryManagementProvider

Native Memory Management Provider class with 16 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { NativeMemoryManagementProvider } from '@codesoul-co/hypha-memory';
  • Source module: native-memory

Declaration

text
export declare class NativeMemoryManagementProvider implements MemoryManagementProvider {
    readonly id: string;
    readonly persistence: MemoryPersistenceUnitOfWork;
    readonly recordStore: MemoryPersistenceUnitOfWork['recordStore'];
    readonly outboxStore: MemoryPersistenceUnitOfWork['outboxStore'];
    readonly retrieval: DefaultMemoryRetrievalPipeline;
    constructor(options: NativeMemoryProviderOptions);
    capabilities(): Promise<MemoryManagementCapabilities>;
    add(request: MemoryAddRequest): Promise<ManagedMemoryWriteResult>;
    search(request: ManagedMemorySearchRequest): Promise<ManagedMemorySearchResult[]>;
    get(request: MemoryGetRequest): Promise<ManagedMemoryRecord | null>;
    list(request: MemoryListRequest): Promise<MemoryListResult>;
    update(request: ManagedMemoryUpdateRequest): Promise<ManagedMemoryWriteResult>;
    delete(request: ManagedMemoryDeleteRequest): Promise<ManagedMemoryDeleteResult>;
    history(request: MemoryHistoryRequest): Promise<MemoryVersion[]>;
    health(): Promise<ProviderHealth>;
    close(): Promise<void>;
}

Public members

MemberKindSignatureDescription
addmethodadd(request: MemoryAddRequest): Promise<ManagedMemoryWriteResult>Public method; parameters and return type are shown in the signature.
capabilitiesmethodcapabilities(): Promise<MemoryManagementCapabilities>Public method; parameters and return type are shown in the signature.
closemethodclose(): Promise<void>Public method; parameters and return type are shown in the signature.
constructorconstructor(options: NativeMemoryProviderOptions): NativeMemoryManagementProviderCreates an instance of this class.
deletemethoddelete(request: ManagedMemoryDeleteRequest): Promise<ManagedMemoryDeleteResult>Public method; parameters and return type are shown in the signature.
getmethodget(request: MemoryGetRequest): Promise<ManagedMemoryRecord | null>Public method; parameters and return type are shown in the signature.
healthmethodhealth(): Promise<ProviderHealth>Public method; parameters and return type are shown in the signature.
historymethodhistory(request: MemoryHistoryRequest): Promise<MemoryVersion[]>Public method; parameters and return type are shown in the signature.
idpropertyreadonly id: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
listmethodlist(request: MemoryListRequest): Promise<MemoryListResult>Public method; parameters and return type are shown in the signature.
outboxStorepropertyreadonly outboxStore: import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/managed-store").MemoryIndexOutboxStorePublic property; its type, readonly modifier and optionality are shown in the signature.
persistencepropertyreadonly persistence: MemoryPersistenceUnitOfWorkPublic property; its type, readonly modifier and optionality are shown in the signature.
recordStorepropertyreadonly recordStore: import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/managed-store").ManagedMemoryRecordStorePublic property; its type, readonly modifier and optionality are shown in the signature.
retrievalpropertyreadonly retrieval: DefaultMemoryRetrievalPipelinePublic property; its type, readonly modifier and optionality are shown in the signature.
searchmethodsearch(request: ManagedMemorySearchRequest): Promise<ManagedMemorySearchResult[]>Public method; parameters and return type are shown in the signature.
updatemethodupdate(request: ManagedMemoryUpdateRequest): Promise<ManagedMemoryWriteResult>Public method; parameters and return type are shown in the signature.

NativeMemoryProviderOptions

Native Memory Provider Options interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { NativeMemoryProviderOptions } from '@codesoul-co/hypha-memory';
  • Source module: native-memory

Declaration

text
export interface NativeMemoryProviderOptions {
    profile: MemoryProfileSpec;
    maintenancePolicy?: MemoryMaintenancePolicySpec;
    persistence?: MemoryPersistenceUnitOfWork;
    idempotencyStore?: MemoryIdempotencyStore;
    events?: MemoryEventPublisher;
    embeddingProvider?: EmbeddingProvider;
    vectorStores?: ManagedVectorStoreAdapter[];
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
embeddingProviderpropertyembeddingProvider?: EmbeddingProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
eventspropertyevents?: MemoryEventPublisherPublic property; its type, readonly modifier and optionality are shown in the signature.
idempotencyStorepropertyidempotencyStore?: MemoryIdempotencyStorePublic property; its type, readonly modifier and optionality are shown in the signature.
maintenancePolicypropertymaintenancePolicy?: MemoryMaintenancePolicySpecPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
persistencepropertypersistence?: MemoryPersistenceUnitOfWorkPublic property; its type, readonly modifier and optionality are shown in the signature.
profilepropertyprofile: MemoryProfileSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
vectorStorespropertyvectorStores?: ManagedVectorStoreAdapter[]Public property; its type, readonly modifier and optionality are shown in the signature.