@codesoul-co/hypha-memory / native-memory
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/native-memory.ts - Exports: 2
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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
NativeMemoryManagementProvider | class | new NativeMemoryManagementProvider(options: NativeMemoryProviderOptions): NativeMemoryManagementProvider | Native Memory Management Provider class with 16 public constructor or member entries; its exact declarations are listed below. |
NativeMemoryProviderOptions | interface | interface NativeMemoryProviderOptions | Native 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
| Member | Kind | Signature | Description |
|---|---|---|---|
add | method | add(request: MemoryAddRequest): Promise<ManagedMemoryWriteResult> | Public method; parameters and return type are shown in the signature. |
capabilities | method | capabilities(): Promise<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: NativeMemoryProviderOptions): NativeMemoryManagementProvider | Creates an instance of this class. |
delete | method | delete(request: ManagedMemoryDeleteRequest): Promise<ManagedMemoryDeleteResult> | Public method; parameters and return type are shown in the signature. |
get | method | get(request: MemoryGetRequest): Promise<ManagedMemoryRecord | null> | Public method; parameters and return type are shown in the signature. |
health | method | health(): Promise<ProviderHealth> | Public method; parameters and return type are shown in the signature. |
history | method | history(request: MemoryHistoryRequest): Promise<MemoryVersion[]> | Public method; parameters and return type are shown in the signature. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
list | method | list(request: MemoryListRequest): Promise<MemoryListResult> | Public method; parameters and return type are shown in the signature. |
outboxStore | property | readonly outboxStore: import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/managed-store").MemoryIndexOutboxStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
persistence | property | readonly persistence: MemoryPersistenceUnitOfWork | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordStore | property | readonly recordStore: import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/managed-store").ManagedMemoryRecordStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
retrieval | property | readonly retrieval: DefaultMemoryRetrievalPipeline | Public property; its type, readonly modifier and optionality are shown in the signature. |
search | method | search(request: ManagedMemorySearchRequest): Promise<ManagedMemorySearchResult[]> | Public method; parameters and return type are shown in the signature. |
update | method | update(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
| Member | Kind | Signature | Description |
|---|---|---|---|
embeddingProvider | property | embeddingProvider?: EmbeddingProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
events | property | events?: MemoryEventPublisher | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyStore | property | idempotencyStore?: MemoryIdempotencyStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
maintenancePolicy | property | maintenancePolicy?: MemoryMaintenancePolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
persistence | property | persistence?: MemoryPersistenceUnitOfWork | Public property; its type, readonly modifier and optionality are shown in the signature. |
profile | property | profile: MemoryProfileSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
vectorStores | property | vectorStores?: ManagedVectorStoreAdapter[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
