Skip to content

@codesoul-co/hypha-memory / structured-extraction-state-store

Using this module

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

Import from the package entrypoint

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

import type {
  StructuredMemoryExtractionStateStoreOptions,
} 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
StructuredMemoryExtractionStateStoreclassnew StructuredMemoryExtractionStateStore(options: StructuredMemoryExtractionStateStoreOptions): StructuredMemoryExtractionStateStoreStructured Memory Extraction State Store class with 7 public constructor or member entries; its exact declarations are listed below.
StructuredMemoryExtractionStateStoreOptionsinterfaceinterface StructuredMemoryExtractionStateStoreOptionsStructured Memory Extraction State Store Options interface with 4 public fields or methods.

StructuredMemoryExtractionStateStore

Structured Memory Extraction State Store class with 7 public constructor or member entries; its exact declarations are listed below.

Declaration

text
export declare class StructuredMemoryExtractionStateStore implements MemoryExtractionStateStore {
    constructor(options: StructuredMemoryExtractionStateStoreOptions);
    getJob(id: string): Promise<MemoryExtractionJob | null>;
    saveJob(job: MemoryExtractionJob): Promise<void>;
    getBatch(id: string): Promise<MemoryExtractionBatch | null>;
    saveBatch(batch: MemoryExtractionBatch): Promise<void>;
    getCursor(sourceType: MemoryExtractionSourceType, sourceId: string): Promise<MemoryExtractionCursor | null>;
    saveCursor(cursor: MemoryExtractionCursor, expectedSequence?: number): Promise<void>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: StructuredMemoryExtractionStateStoreOptions): StructuredMemoryExtractionStateStoreCreates an instance of this class.
getBatchmethodgetBatch(id: string): Promise<MemoryExtractionBatch | null>Public method; parameters and return type are shown in the signature.
getCursormethodgetCursor(sourceType: MemoryExtractionSourceType, sourceId: string): Promise<MemoryExtractionCursor | null>Public method; parameters and return type are shown in the signature.
getJobmethodgetJob(id: string): Promise<MemoryExtractionJob | null>Public method; parameters and return type are shown in the signature.
saveBatchmethodsaveBatch(batch: MemoryExtractionBatch): Promise<void>Public method; parameters and return type are shown in the signature.
saveCursormethodsaveCursor(cursor: MemoryExtractionCursor, expectedSequence?: number): Promise<void>Public method; parameters and return type are shown in the signature.
saveJobmethodsaveJob(job: MemoryExtractionJob): Promise<void>Public method; parameters and return type are shown in the signature.

StructuredMemoryExtractionStateStoreOptions

Structured Memory Extraction State Store Options interface with 4 public fields or methods.

Declaration

text
export interface StructuredMemoryExtractionStateStoreOptions {
    store: StructuredStoreProvider;
    jobTable?: string;
    batchTable?: string;
    cursorTable?: string;
}

Contract members

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