@codesoul-co/hypha-memory / native-memory-runtime
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/native-memory-runtime.ts - Exports: 3
Using this module
Use the Native memory runtime module for executing runtime behavior at this boundary. It exports 1 function, 2 interfaces.
Import from the package entrypoint
ts
import {
createNativeMemoryManagementProviderFactory,
} from '@codesoul-co/hypha-memory';
import type {
NativeMemoryRuntimeDependencies,
NativeMemoryRuntimeResources,
} 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 function as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
createNativeMemoryManagementProviderFactory | function | createNativeMemoryManagementProviderFactory(dependencies: NativeMemoryRuntimeDependencies): MemoryManagementProviderFactory | Create Native Memory Management Provider Factory function with 1 public call signature; parameters and return types are listed below. |
NativeMemoryRuntimeDependencies | interface | interface NativeMemoryRuntimeDependencies | Native Memory Runtime Dependencies interface with 15 public fields or methods. |
NativeMemoryRuntimeResources | interface | interface NativeMemoryRuntimeResources | Native Memory Runtime Resources interface with 3 public fields or methods. |
createNativeMemoryManagementProviderFactory
Create Native Memory Management Provider Factory function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { createNativeMemoryManagementProviderFactory } from '@codesoul-co/hypha-memory'; - Source module:
native-memory-runtime
Declaration
text
export declare function createNativeMemoryManagementProviderFactory(dependencies: NativeMemoryRuntimeDependencies): MemoryManagementProviderFactory;Call signature
text
createNativeMemoryManagementProviderFactory(dependencies: NativeMemoryRuntimeDependencies): MemoryManagementProviderFactoryParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dependencies | NativeMemoryRuntimeDependencies | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MemoryManagementProviderFactory - Description: The return contract is defined by the type shown above.
NativeMemoryRuntimeDependencies
Native Memory Runtime Dependencies interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { NativeMemoryRuntimeDependencies } from '@codesoul-co/hypha-memory'; - Source module:
native-memory-runtime
Declaration
text
export interface NativeMemoryRuntimeDependencies {
structuredStore: StructuredStoreProvider;
structuredStoreId: string;
redisClient?: RedisLikeWorkingMemoryClient;
embeddingProvider?: EmbeddingProvider;
embeddingProviderId?: string;
vectorStores: ManagedVectorStoreAdapter[];
lifecycleHandlers?: Partial<Record<MemoryLifecycleWorkerType, MemoryLifecycleTaskHandler>>;
ownerId: string;
workingMemoryNamespace?: string;
workingMemoryTtlSeconds?: number;
events?: MemoryEventPublisher;
onIndexEvent?: (event: IndexOutboxWorkerEvent) => void | Promise<void>;
onLifecycleEvent?: (event: MemoryLifecycleWorkerEvent) => void | Promise<void>;
now?: () => Date;
close?: () => Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
close | method | close?(): Promise<void> | Public method; parameters and return type are shown in the signature. |
embeddingProvider | property | embeddingProvider?: EmbeddingProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
embeddingProviderId | property | embeddingProviderId?: string | 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. |
lifecycleHandlers | property | lifecycleHandlers?: Partial<Record<MemoryLifecycleWorkerType, MemoryLifecycleTaskHandler>> | 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. |
onIndexEvent | method | onIndexEvent?(event: IndexOutboxWorkerEvent): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
onLifecycleEvent | method | onLifecycleEvent?(event: MemoryLifecycleWorkerEvent): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
redisClient | property | redisClient?: RedisLikeWorkingMemoryClient | Public property; its type, readonly modifier and optionality are shown in the signature. |
structuredStore | property | structuredStore: StructuredStoreProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
structuredStoreId | property | structuredStoreId: string | 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. |
workingMemoryNamespace | property | workingMemoryNamespace?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workingMemoryTtlSeconds | property | workingMemoryTtlSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
NativeMemoryRuntimeResources
Native Memory Runtime Resources interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { NativeMemoryRuntimeResources } from '@codesoul-co/hypha-memory'; - Source module:
native-memory-runtime
Declaration
text
export interface NativeMemoryRuntimeResources {
workingStore: WorkingMemoryStore;
lifecycleStore: StructuredMemoryLifecycleTaskStore;
supervisor: MemoryWorkerSupervisor;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
lifecycleStore | property | lifecycleStore: StructuredMemoryLifecycleTaskStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
supervisor | property | supervisor: MemoryWorkerSupervisor | Public property; its type, readonly modifier and optionality are shown in the signature. |
workingStore | property | workingStore: WorkingMemoryStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
