@codesoul-co/hypha-memory / external-adapters
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/external-adapters.ts - Exports: 19
Using this module
Use the External adapters module for binding external or local providers to Hypha ports. It exports 4 classes, 2 constants, 2 functions, 9 interfaces, 2 types.
Import from the package entrypoint
import {
ExternalMemoryManagementAdapter,
InMemoryExternalMemoryMappingStore,
Mem0MemoryManagementAdapter,
MemoryBankMemoryManagementAdapter,
externalMemoryMappingSchema,
unsupportedMemoryManagementCapabilities,
negotiateMemoryManagementCapabilities,
resolveExternalMemoryMappingStore,
} from '@codesoul-co/hypha-memory';
import type {
ExternalMemoryAdapterOptions,
ExternalMemoryClient,
ExternalMemoryMapping,
ExternalMemoryMappingBinding,
ExternalMemoryMappingStore,
ExternalProviderStateChange,
Mem0MemoryManagementAdapterOptions,
MemoryBankMemoryManagementAdapterOptions,
} from '@codesoul-co/hypha-memory';
// The complete export list is documented below.Usage patterns
- Use the 11 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 4 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
- The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 2 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
ExternalMemoryManagementAdapter | class | new ExternalMemoryManagementAdapter(options: ExternalMemoryAdapterOptions): ExternalMemoryManagementAdapter | External Memory Management Adapter class with 12 public constructor or member entries; its exact declarations are listed below. |
InMemoryExternalMemoryMappingStore | class | new InMemoryExternalMemoryMappingStore(): InMemoryExternalMemoryMappingStore | In Memory External Memory Mapping Store class with 6 public constructor or member entries; its exact declarations are listed below. |
Mem0MemoryManagementAdapter | class | new Mem0MemoryManagementAdapter(options: Mem0MemoryManagementAdapterOptions): Mem0MemoryManagementAdapter | Mem0 Memory Management Adapter class with 13 public constructor or member entries; its exact declarations are listed below. |
MemoryBankMemoryManagementAdapter | class | new MemoryBankMemoryManagementAdapter(options: MemoryBankMemoryManagementAdapterOptions): MemoryBankMemoryManagementAdapter | Memory Bank Memory Management Adapter class with 13 public constructor or member entries; its exact declarations are listed below. |
externalMemoryMappingSchema | constant | const externalMemoryMappingSchema: ZodType<ExternalMemoryMapping, ZodTypeDef, ExternalMemoryMapping> | Runtime schema for External Memory Mapping. |
unsupportedMemoryManagementCapabilities | constant | const unsupportedMemoryManagementCapabilities: MemoryManagementCapabilities | Unsupported Memory Management Capabilities constant exported by the external-adapters module. |
negotiateMemoryManagementCapabilities | function | negotiateMemoryManagementCapabilities(value: unknown): MemoryManagementCapabilities | Negotiate Memory Management Capabilities function with 1 public call signature; parameters and return types are listed below. |
resolveExternalMemoryMappingStore | function | resolveExternalMemoryMappingStore(store: ExternalMemoryMappingStore | undefined, profile: ExternalMemoryMappingRuntimeProfile): ExternalMemoryMappingStore | Resolve External Memory Mapping Store function with 1 public call signature; parameters and return types are listed below. |
ExternalMemoryAdapterOptions | interface | interface ExternalMemoryAdapterOptions | External Memory Adapter Options interface with 11 public fields or methods. |
ExternalMemoryClient | interface | interface ExternalMemoryClient | External Memory Client interface with 10 public fields or methods. |
ExternalMemoryMapping | interface | interface ExternalMemoryMapping | External Memory Mapping interface with 8 public fields or methods. |
ExternalMemoryMappingBinding | interface | interface ExternalMemoryMappingBinding | External Memory Mapping Binding interface with 4 public fields or methods. |
ExternalMemoryMappingStore | interface | interface ExternalMemoryMappingStore | External Memory Mapping Store interface with 5 public fields or methods. |
ExternalProviderStateChange | interface | interface ExternalProviderStateChange | External Provider State Change interface with 4 public fields or methods. |
Mem0MemoryManagementAdapterOptions | interface | interface Mem0MemoryManagementAdapterOptions extends Omit<ExternalMemoryAdapterOptions, 'id'> | Mem0 Memory Management Adapter Options interface with 12 public fields or methods. |
MemoryBankMemoryManagementAdapterOptions | interface | interface MemoryBankMemoryManagementAdapterOptions extends Omit<ExternalMemoryAdapterOptions, 'id'> | Memory Bank Memory Management Adapter Options interface with 12 public fields or methods. |
MemoryBankPolicySpec | interface | interface MemoryBankPolicySpec | Memory Bank Policy Spec interface with 8 public fields or methods. |
ExternalMemoryMappingRuntimeProfile | type | type ExternalMemoryMappingRuntimeProfile = 'production' | 'test' | 'ephemeral' | Public type alias for External Memory Mapping Runtime Profile; the declaration contains its complete type expression. |
ExternalMemoryMappingStoreDurability | type | type ExternalMemoryMappingStoreDurability = 'ephemeral' | 'durable' | Public type alias for External Memory Mapping Store Durability; the declaration contains its complete type expression. |
ExternalMemoryManagementAdapter
External Memory Management Adapter class with 12 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { ExternalMemoryManagementAdapter } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare class ExternalMemoryManagementAdapter implements MemoryManagementProvider {
readonly id: string;
constructor(options: ExternalMemoryAdapterOptions);
capabilities(): Promise<MemoryManagementCapabilities>;
add(request: MemoryAddRequest, signal?: AbortSignal): Promise<ManagedMemoryWriteResult>;
search(request: ManagedMemorySearchRequest, signal?: AbortSignal): Promise<ManagedMemorySearchResult[]>;
get(request: MemoryGetRequest, signal?: AbortSignal): Promise<ManagedMemoryRecord | 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(): Promise<ProviderHealth>;
close(): Promise<void>;
}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<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: ExternalMemoryAdapterOptions): ExternalMemoryManagementAdapter | 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<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, signal?: AbortSignal): 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, signal?: AbortSignal): Promise<MemoryListResult> | 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. |
InMemoryExternalMemoryMappingStore
In Memory External Memory Mapping Store class with 6 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { InMemoryExternalMemoryMappingStore } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare class InMemoryExternalMemoryMappingStore implements ExternalMemoryMappingStore {
readonly durability: "ephemeral";
get(providerId: string, memoryId: string): Promise<ExternalMemoryMapping | null>;
getByExternalId(providerId: string, externalId: string): Promise<ExternalMemoryMapping | null>;
set(mapping: ExternalMemoryMapping): Promise<void>;
list(providerId: string): Promise<ExternalMemoryMapping[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (): InMemoryExternalMemoryMappingStore | Creates an instance of this class. |
durability | property | readonly durability: "ephemeral" | Public property; its type, readonly modifier and optionality are shown in the signature. |
get | method | get(providerId: string, memoryId: string): Promise<ExternalMemoryMapping | null> | Public method; parameters and return type are shown in the signature. |
getByExternalId | method | getByExternalId(providerId: string, externalId: string): Promise<ExternalMemoryMapping | null> | Public method; parameters and return type are shown in the signature. |
list | method | list(providerId: string): Promise<ExternalMemoryMapping[]> | Public method; parameters and return type are shown in the signature. |
set | method | set(mapping: ExternalMemoryMapping): Promise<void> | Public method; parameters and return type are shown in the signature. |
Mem0MemoryManagementAdapter
Mem0 Memory Management Adapter class with 13 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { Mem0MemoryManagementAdapter } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare class Mem0MemoryManagementAdapter extends ExternalMemoryManagementAdapter {
readonly deployment: 'managed' | 'self_hosted';
constructor(options: Mem0MemoryManagementAdapterOptions);
}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<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: Mem0MemoryManagementAdapterOptions): Mem0MemoryManagementAdapter | 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. |
deployment | property | readonly deployment: "self_hosted" | "managed" | Public property; its type, readonly modifier and optionality 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(): 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. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality 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. |
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. |
MemoryBankMemoryManagementAdapter
Memory Bank Memory Management Adapter class with 13 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MemoryBankMemoryManagementAdapter } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare class MemoryBankMemoryManagementAdapter extends ExternalMemoryManagementAdapter {
readonly policy: MemoryBankPolicySpec;
constructor(options: MemoryBankMemoryManagementAdapterOptions);
}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<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: MemoryBankMemoryManagementAdapterOptions): MemoryBankMemoryManagementAdapter | 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<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, signal?: AbortSignal): 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, signal?: AbortSignal): Promise<MemoryListResult> | Public method; parameters and return type are shown in the signature. |
policy | property | readonly policy: MemoryBankPolicySpec | Public property; its type, readonly modifier and optionality 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. |
externalMemoryMappingSchema
Runtime schema for External Memory Mapping.
- Kind: constant
- Import:
import { externalMemoryMappingSchema } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare const externalMemoryMappingSchema: ZodType<ExternalMemoryMapping, ZodTypeDef, ExternalMemoryMapping>;unsupportedMemoryManagementCapabilities
Unsupported Memory Management Capabilities constant exported by the external-adapters module.
- Kind: constant
- Import:
import { unsupportedMemoryManagementCapabilities } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare const unsupportedMemoryManagementCapabilities: MemoryManagementCapabilities;negotiateMemoryManagementCapabilities
Negotiate Memory Management Capabilities function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { negotiateMemoryManagementCapabilities } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare function negotiateMemoryManagementCapabilities(value: unknown): MemoryManagementCapabilities;Call signature
negotiateMemoryManagementCapabilities(value: unknown): MemoryManagementCapabilitiesParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MemoryManagementCapabilities - Description: The return contract is defined by the type shown above.
resolveExternalMemoryMappingStore
Resolve External Memory Mapping Store function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { resolveExternalMemoryMappingStore } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export declare function resolveExternalMemoryMappingStore(store: ExternalMemoryMappingStore | undefined, profile: ExternalMemoryMappingRuntimeProfile): ExternalMemoryMappingStore;Call signature
resolveExternalMemoryMappingStore(store: ExternalMemoryMappingStore | undefined, profile: ExternalMemoryMappingRuntimeProfile): ExternalMemoryMappingStoreParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
store | ExternalMemoryMappingStore | Yes | Required parameter; accepted values are defined by the type column. |
profile | ExternalMemoryMappingRuntimeProfile | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
ExternalMemoryMappingStore - Description: The return contract is defined by the type shown above.
ExternalMemoryAdapterOptions
External Memory Adapter Options interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { ExternalMemoryAdapterOptions } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface ExternalMemoryAdapterOptions {
id: string;
client: ExternalMemoryClient;
fallback?: MemoryManagementProvider;
fallbackPolicy?: MemoryFallbackPolicySpec;
mappingStore?: ExternalMemoryMappingStore;
mappingProfile?: ExternalMemoryMappingRuntimeProfile;
timeoutMs?: number;
retryAttempts?: number;
circuitBreaker?: {
failureThreshold: number;
resetAfterMs: number;
};
now?: () => Date;
onStateChange?: (event: ExternalProviderStateChange) => void | Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
circuitBreaker | property | circuitBreaker?: { failureThreshold: number; resetAfterMs: number; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
client | property | client: ExternalMemoryClient | Public property; its type, readonly modifier and optionality are shown in the signature. |
fallback | property | fallback?: MemoryManagementProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
fallbackPolicy | property | fallbackPolicy?: MemoryFallbackPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality 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. |
onStateChange | method | onStateChange?(event: ExternalProviderStateChange): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
retryAttempts | property | retryAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutMs | property | timeoutMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExternalMemoryClient
External Memory Client interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { ExternalMemoryClient } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface ExternalMemoryClient {
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<ManagedMemoryRecord | 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>;
}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. |
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. |
ExternalMemoryMapping
External Memory Mapping interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { ExternalMemoryMapping } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface ExternalMemoryMapping {
memoryId: string;
providerId: string;
externalId: string;
externalVersion?: string;
binding: ExternalMemoryMappingBinding;
lastSyncedAt: string;
syncState: 'synced' | 'pending' | 'failed' | 'deleted';
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
binding | property | binding: ExternalMemoryMappingBinding | Public property; its type, readonly modifier and optionality are shown in the signature. |
externalId | property | externalId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
externalVersion | property | externalVersion?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastSyncedAt | property | lastSyncedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryId | property | memoryId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | 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. |
syncState | property | syncState: "failed" | "deleted" | "pending" | "synced" | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExternalMemoryMappingBinding
External Memory Mapping Binding interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ExternalMemoryMappingBinding } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface ExternalMemoryMappingBinding {
scopeHash: string;
profileRef?: MemoryContractSpecRef;
recordRevision: number;
provenance: MemoryProvenance;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
profileRef | property | profileRef?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
provenance | property | provenance: MemoryProvenance | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordRevision | property | recordRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeHash | property | scopeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExternalMemoryMappingStore
External Memory Mapping Store interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { ExternalMemoryMappingStore } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface ExternalMemoryMappingStore {
readonly durability: ExternalMemoryMappingStoreDurability;
get(providerId: string, memoryId: string): Promise<ExternalMemoryMapping | null>;
getByExternalId(providerId: string, externalId: string): Promise<ExternalMemoryMapping | null>;
set(mapping: ExternalMemoryMapping): Promise<void>;
list(providerId: string): Promise<ExternalMemoryMapping[]>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
durability | property | readonly durability: ExternalMemoryMappingStoreDurability | Public property; its type, readonly modifier and optionality are shown in the signature. |
get | method | get(providerId: string, memoryId: string): Promise<ExternalMemoryMapping | null> | Public method; parameters and return type are shown in the signature. |
getByExternalId | method | getByExternalId(providerId: string, externalId: string): Promise<ExternalMemoryMapping | null> | Public method; parameters and return type are shown in the signature. |
list | method | list(providerId: string): Promise<ExternalMemoryMapping[]> | Public method; parameters and return type are shown in the signature. |
set | method | set(mapping: ExternalMemoryMapping): Promise<void> | Public method; parameters and return type are shown in the signature. |
ExternalProviderStateChange
External Provider State Change interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ExternalProviderStateChange } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface ExternalProviderStateChange {
type: 'degraded' | 'recovered' | 'circuit_opened' | 'quarantined';
providerId: string;
occurredAt: string;
error?: NormalizedMemoryError;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
error | property | error?: NormalizedMemoryError | Public property; its type, readonly modifier and optionality are shown in the signature. |
occurredAt | property | occurredAt: string | 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. |
type | property | type: "degraded" | "quarantined" | "recovered" | "circuit_opened" | Public property; its type, readonly modifier and optionality are shown in the signature. |
Mem0MemoryManagementAdapterOptions
Mem0 Memory Management Adapter Options interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { Mem0MemoryManagementAdapterOptions } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface Mem0MemoryManagementAdapterOptions extends Omit<ExternalMemoryAdapterOptions, 'id'> {
id?: string;
deployment?: 'managed' | 'self_hosted';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
circuitBreaker | property | circuitBreaker?: { failureThreshold: number; resetAfterMs: number; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
client | property | client: ExternalMemoryClient | Public property; its type, readonly modifier and optionality are shown in the signature. |
deployment | property | deployment?: "self_hosted" | "managed" | Public property; its type, readonly modifier and optionality are shown in the signature. |
fallback | property | fallback?: MemoryManagementProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
fallbackPolicy | property | fallbackPolicy?: MemoryFallbackPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id?: string | Public property; its type, readonly modifier and optionality 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. |
onStateChange | method | onStateChange?(event: ExternalProviderStateChange): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
retryAttempts | property | retryAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutMs | property | timeoutMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryBankMemoryManagementAdapterOptions
Memory Bank Memory Management Adapter Options interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { MemoryBankMemoryManagementAdapterOptions } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface MemoryBankMemoryManagementAdapterOptions extends Omit<ExternalMemoryAdapterOptions, 'id'> {
id?: string;
policy: MemoryBankPolicySpec;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
circuitBreaker | property | circuitBreaker?: { failureThreshold: number; resetAfterMs: number; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
client | property | client: ExternalMemoryClient | Public property; its type, readonly modifier and optionality are shown in the signature. |
fallback | property | fallback?: MemoryManagementProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
fallbackPolicy | property | fallbackPolicy?: MemoryFallbackPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id?: string | Public property; its type, readonly modifier and optionality 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. |
onStateChange | method | onStateChange?(event: ExternalProviderStateChange): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
policy | property | policy: MemoryBankPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryAttempts | property | retryAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutMs | property | timeoutMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryBankPolicySpec
Memory Bank Policy Spec interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryBankPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export interface MemoryBankPolicySpec {
extractionProfileRef?: import('./contracts').MemoryContractSpecRef;
importanceThreshold?: number;
reinforcementFactor?: number;
decayFunction?: 'exponential' | 'linear' | 'custom';
decayHalfLifeSeconds?: number;
consolidationThreshold?: number;
consolidationMinItems?: number;
preserveOriginals?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
consolidationMinItems | property | consolidationMinItems?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
consolidationThreshold | property | consolidationThreshold?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
decayFunction | property | decayFunction?: "custom" | "exponential" | "linear" | Public property; its type, readonly modifier and optionality are shown in the signature. |
decayHalfLifeSeconds | property | decayHalfLifeSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
extractionProfileRef | property | extractionProfileRef?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
importanceThreshold | property | importanceThreshold?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
preserveOriginals | property | preserveOriginals?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
reinforcementFactor | property | reinforcementFactor?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExternalMemoryMappingRuntimeProfile
Public type alias for External Memory Mapping Runtime Profile; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ExternalMemoryMappingRuntimeProfile } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export type ExternalMemoryMappingRuntimeProfile = 'production' | 'test' | 'ephemeral';ExternalMemoryMappingStoreDurability
Public type alias for External Memory Mapping Store Durability; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ExternalMemoryMappingStoreDurability } from '@codesoul-co/hypha-memory'; - Source module:
external-adapters
Declaration
export type ExternalMemoryMappingStoreDurability = 'ephemeral' | 'durable';