Skip to content

@codesoul-co/hypha-memory / structured-external-mapping-store

Using this module

Use the Structured external mapping store module for persisting and reading data at this boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

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

import type {
  StructuredExternalMemoryMappingStoreOptions,
} 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
StructuredExternalMemoryMappingStoreclassnew StructuredExternalMemoryMappingStore(options: StructuredExternalMemoryMappingStoreOptions): StructuredExternalMemoryMappingStorePersistent, restart-safe mapping between Hypha memory IDs and provider IDs.
StructuredExternalMemoryMappingStoreOptionsinterfaceinterface StructuredExternalMemoryMappingStoreOptionsStructured External Memory Mapping Store Options interface with 2 public fields or methods.

StructuredExternalMemoryMappingStore

Persistent, restart-safe mapping between Hypha memory IDs and provider IDs.

Declaration

text
export declare class StructuredExternalMemoryMappingStore implements ExternalMemoryMappingStore {
    readonly durability: "durable";
    constructor(options: StructuredExternalMemoryMappingStoreOptions);
    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

MemberKindSignatureDescription
constructorconstructor(options: StructuredExternalMemoryMappingStoreOptions): StructuredExternalMemoryMappingStoreCreates an instance of this class.
durabilitypropertyreadonly durability: "durable"Public property; its type, readonly modifier and optionality are shown in the signature.
getmethodget(providerId: string, memoryId: string): Promise<ExternalMemoryMapping | null>Public method; parameters and return type are shown in the signature.
getByExternalIdmethodgetByExternalId(providerId: string, externalId: string): Promise<ExternalMemoryMapping | null>Public method; parameters and return type are shown in the signature.
listmethodlist(providerId: string): Promise<ExternalMemoryMapping[]>Public method; parameters and return type are shown in the signature.
setmethodset(mapping: ExternalMemoryMapping): Promise<void>Public method; parameters and return type are shown in the signature.

StructuredExternalMemoryMappingStoreOptions

Structured External Memory Mapping Store Options interface with 2 public fields or methods.

Declaration

text
export interface StructuredExternalMemoryMappingStoreOptions {
    store: StructuredStoreProvider;
    table?: string;
}

Contract members

MemberKindSignatureDescription
storepropertystore: StructuredStoreProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
tablepropertytable?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.