Skip to content

@codesoul-co/hypha-memory / hybrid

Using this module

Use the Hybrid 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 {
  HybridMemoryProvider,
} from '@codesoul-co/hypha-memory';

import type {
  HybridMemoryProviderOptions,
} 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
HybridMemoryProviderclassnew HybridMemoryProvider(options: HybridMemoryProviderOptions): HybridMemoryProviderHybrid Memory Provider class with 8 public constructor or member entries; its exact declarations are listed below.
HybridMemoryProviderOptionsinterfaceinterface HybridMemoryProviderOptionsHybrid Memory Provider Options interface with 5 public fields or methods.

HybridMemoryProvider

Hybrid Memory Provider class with 8 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { HybridMemoryProvider } from '@codesoul-co/hypha-memory';
  • Source module: hybrid

Declaration

text
export declare class HybridMemoryProvider implements MemoryProvider {
    constructor(options: HybridMemoryProviderOptions);
    read(scope: MemoryScope, query: MemoryReadQuery): Promise<MemoryRecord[]>;
    search(scope: MemoryScope, query: MemorySearchQuery): Promise<MemorySearchResult[]>;
    write(scope: MemoryScope, record: MemoryRecord, policy: MemoryWritePolicy): Promise<MemoryWriteResult>;
    update(scope: MemoryScope, recordId: string, patch: Partial<MemoryRecord>): Promise<void>;
    invalidate(scope: MemoryScope, recordId: string, reason: string): Promise<void>;
    summarize(scope: MemoryScope, options?: MemorySummaryOptions): Promise<MemorySummary>;
    audit(scope: MemoryScope, _options?: MemoryAuditOptions): Promise<MemoryAuditReport>;
}

Public members

MemberKindSignatureDescription
auditmethodaudit(scope: MemoryScope, _options?: MemoryAuditOptions): Promise<MemoryAuditReport>Public method; parameters and return type are shown in the signature.
constructorconstructor(options: HybridMemoryProviderOptions): HybridMemoryProviderCreates an instance of this class.
invalidatemethodinvalidate(scope: MemoryScope, recordId: string, reason: string): Promise<void>Public method; parameters and return type are shown in the signature.
readmethodread(scope: MemoryScope, query: MemoryReadQuery): Promise<MemoryRecord[]>Public method; parameters and return type are shown in the signature.
searchmethodsearch(scope: MemoryScope, query: MemorySearchQuery): Promise<MemorySearchResult[]>Public method; parameters and return type are shown in the signature.
summarizemethodsummarize(scope: MemoryScope, options?: MemorySummaryOptions): Promise<MemorySummary>Public method; parameters and return type are shown in the signature.
updatemethodupdate(scope: MemoryScope, recordId: string, patch: Partial<MemoryRecord>): Promise<void>Public method; parameters and return type are shown in the signature.
writemethodwrite(scope: MemoryScope, record: MemoryRecord, policy: MemoryWritePolicy): Promise<MemoryWriteResult>Public method; parameters and return type are shown in the signature.

HybridMemoryProviderOptions

Hybrid Memory Provider Options interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { HybridMemoryProviderOptions } from '@codesoul-co/hypha-memory';
  • Source module: hybrid

Declaration

text
export interface HybridMemoryProviderOptions {
    structured: StructuredStoreProvider;
    vector?: VectorIndexProvider;
    artifacts?: ArtifactStoreProvider;
    embeddings?: EmbeddingProvider;
    tableName?: string;
}

Contract members

MemberKindSignatureDescription
artifactspropertyartifacts?: ArtifactStoreProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
embeddingspropertyembeddings?: EmbeddingProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
structuredpropertystructured: StructuredStoreProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
tableNamepropertytableName?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
vectorpropertyvector?: VectorIndexProviderPublic property; its type, readonly modifier and optionality are shown in the signature.