@codesoul-co/hypha-memory / index-outbox
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/index-outbox.ts - Exports: 11
Using this module
Use the Index outbox module for using the public contracts and operations for this capability boundary. It exports 3 classes, 8 interfaces.
Import from the package entrypoint
import {
IndexOutboxWorker,
InMemoryLocalVectorStoreAdapter,
LegacyVectorIndexStoreAdapter,
} from '@codesoul-co/hypha-memory';
import type {
IndexOutboxWorkerEvent,
IndexOutboxWorkerOptions,
IndexOutboxWorkerRunResult,
ManagedVectorPoint,
ManagedVectorSearchRequest,
ManagedVectorSearchResult,
ManagedVectorStoreAdapter,
ManagedVectorWriteOptions,
} from '@codesoul-co/hypha-memory';Usage patterns
- Use the 8 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 3 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
IndexOutboxWorker | class | new IndexOutboxWorker(options: IndexOutboxWorkerOptions): IndexOutboxWorker | Index Outbox Worker class with 6 public constructor or member entries; its exact declarations are listed below. |
InMemoryLocalVectorStoreAdapter | class | new InMemoryLocalVectorStoreAdapter(id?: string): InMemoryLocalVectorStoreAdapter | In Memory Local Vector Store Adapter class with 6 public constructor or member entries; its exact declarations are listed below. |
LegacyVectorIndexStoreAdapter | class | new LegacyVectorIndexStoreAdapter(id: string, provider: VectorIndexProvider): LegacyVectorIndexStoreAdapter | Legacy Vector Index Store Adapter class with 6 public constructor or member entries; its exact declarations are listed below. |
IndexOutboxWorkerEvent | interface | interface IndexOutboxWorkerEvent | Index Outbox Worker Event interface with 7 public fields or methods. |
IndexOutboxWorkerOptions | interface | interface IndexOutboxWorkerOptions | Index Outbox Worker Options interface with 14 public fields or methods. |
IndexOutboxWorkerRunResult | interface | interface IndexOutboxWorkerRunResult | Index Outbox Worker Run Result interface with 4 public fields or methods. |
ManagedVectorPoint | interface | interface ManagedVectorPoint | Managed Vector Point interface with 3 public fields or methods. |
ManagedVectorSearchRequest | interface | interface ManagedVectorSearchRequest | Managed Vector Search Request interface with 4 public fields or methods. |
ManagedVectorSearchResult | interface | interface ManagedVectorSearchResult | Managed Vector Search Result interface with 3 public fields or methods. |
ManagedVectorStoreAdapter | interface | interface ManagedVectorStoreAdapter | Managed Vector Store Adapter interface with 5 public fields or methods. |
ManagedVectorWriteOptions | interface | interface ManagedVectorWriteOptions | Managed Vector Write Options interface with 2 public fields or methods. |
IndexOutboxWorker
Index Outbox Worker class with 6 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { IndexOutboxWorker } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export declare class IndexOutboxWorker {
constructor(options: IndexOutboxWorkerOptions);
runOnce(): Promise<IndexOutboxWorkerRunResult>;
start(): void;
stop(): void;
drain(): Promise<void>;
stopAndDrain(): Promise<void>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: IndexOutboxWorkerOptions): IndexOutboxWorker | Creates an instance of this class. |
drain | method | drain(): Promise<void> | Public method; parameters and return type are shown in the signature. |
runOnce | method | runOnce(): Promise<IndexOutboxWorkerRunResult> | Public method; parameters and return type are shown in the signature. |
start | method | start(): void | Public method; parameters and return type are shown in the signature. |
stop | method | stop(): void | Public method; parameters and return type are shown in the signature. |
stopAndDrain | method | stopAndDrain(): Promise<void> | Public method; parameters and return type are shown in the signature. |
InMemoryLocalVectorStoreAdapter
In Memory Local Vector Store Adapter class with 6 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { InMemoryLocalVectorStoreAdapter } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export declare class InMemoryLocalVectorStoreAdapter implements ManagedVectorStoreAdapter {
readonly id: string;
constructor(id?: string);
upsert(points: ManagedVectorPoint[], options?: ManagedVectorWriteOptions): Promise<void>;
delete(ids: string[], options?: ManagedVectorWriteOptions): Promise<void>;
search(request: ManagedVectorSearchRequest): Promise<ManagedVectorSearchResult[]>;
health(): Promise<ProviderHealth>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (id?: string): InMemoryLocalVectorStoreAdapter | Creates an instance of this class. |
delete | method | delete(ids: string[], options?: ManagedVectorWriteOptions): Promise<void> | 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. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
search | method | search(request: ManagedVectorSearchRequest): Promise<ManagedVectorSearchResult[]> | Public method; parameters and return type are shown in the signature. |
upsert | method | upsert(points: ManagedVectorPoint[], options?: ManagedVectorWriteOptions): Promise<void> | Public method; parameters and return type are shown in the signature. |
LegacyVectorIndexStoreAdapter
Legacy Vector Index Store Adapter class with 6 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { LegacyVectorIndexStoreAdapter } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export declare class LegacyVectorIndexStoreAdapter implements ManagedVectorStoreAdapter {
readonly id: string;
constructor(id: string, provider: VectorIndexProvider);
upsert(points: ManagedVectorPoint[], options?: ManagedVectorWriteOptions): Promise<void>;
delete(ids: string[], options?: ManagedVectorWriteOptions): Promise<void>;
search(request: ManagedVectorSearchRequest): Promise<ManagedVectorSearchResult[]>;
health(): Promise<ProviderHealth>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (id: string, provider: VectorIndexProvider): LegacyVectorIndexStoreAdapter | Creates an instance of this class. |
delete | method | delete(ids: string[], options?: ManagedVectorWriteOptions): Promise<void> | 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. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
search | method | search(request: ManagedVectorSearchRequest): Promise<ManagedVectorSearchResult[]> | Public method; parameters and return type are shown in the signature. |
upsert | method | upsert(points: ManagedVectorPoint[], options?: ManagedVectorWriteOptions): Promise<void> | Public method; parameters and return type are shown in the signature. |
IndexOutboxWorkerEvent
Index Outbox Worker Event interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { IndexOutboxWorkerEvent } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface IndexOutboxWorkerEvent {
type: 'memory.index.started' | 'memory.index.completed' | 'memory.index.partial' | 'memory.index.failed';
operationId: string;
outboxId: string;
memoryId: string;
memoryVersionId: string;
scopeHash: 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. |
memoryId | property | memoryId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryVersionId | property | memoryVersionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationId | property | operationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
outboxId | property | outboxId: string | 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. |
type | property | type: "memory.index.started" | "memory.index.completed" | "memory.index.partial" | "memory.index.failed" | Public property; its type, readonly modifier and optionality are shown in the signature. |
IndexOutboxWorkerOptions
Index Outbox Worker Options interface with 14 public fields or methods.
- Kind: interface
- Import:
import type { IndexOutboxWorkerOptions } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface IndexOutboxWorkerOptions {
ownerId: string;
outboxStore: MemoryIndexOutboxStore;
recordStore: ManagedMemoryRecordStore;
embeddingProvider: EmbeddingProvider;
vectorStores: ManagedVectorStoreAdapter[];
batchSize?: number;
leaseMs?: number;
renewalMs?: number;
maxAttempts?: number;
retryDelayMs?: number;
pollIntervalMs?: number;
now?: () => Date;
onEvent?: (event: IndexOutboxWorkerEvent) => void | Promise<void>;
onError?: (error: NormalizedMemoryError) => void | Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
batchSize | property | batchSize?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
embeddingProvider | property | embeddingProvider: EmbeddingProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseMs | property | leaseMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxAttempts | property | maxAttempts?: number | 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. |
onError | method | onError?(error: NormalizedMemoryError): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
onEvent | method | onEvent?(event: IndexOutboxWorkerEvent): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
outboxStore | property | outboxStore: MemoryIndexOutboxStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
pollIntervalMs | property | pollIntervalMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordStore | property | recordStore: ManagedMemoryRecordStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
renewalMs | property | renewalMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryDelayMs | property | retryDelayMs?: number | 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. |
IndexOutboxWorkerRunResult
Index Outbox Worker Run Result interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { IndexOutboxWorkerRunResult } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface IndexOutboxWorkerRunResult {
leased: number;
completed: number;
failed: number;
deadLettered: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
completed | property | completed: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadLettered | property | deadLettered: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
failed | property | failed: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
leased | property | leased: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ManagedVectorPoint
Managed Vector Point interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ManagedVectorPoint } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface ManagedVectorPoint {
id: string;
vector: number[];
metadata: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: 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. |
vector | property | vector: number[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ManagedVectorSearchRequest
Managed Vector Search Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ManagedVectorSearchRequest } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface ManagedVectorSearchRequest {
vector: number[];
topK: number;
filter?: Record<string, unknown>;
scoreThreshold?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
filter | property | filter?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
scoreThreshold | property | scoreThreshold?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
topK | property | topK: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
vector | property | vector: number[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ManagedVectorSearchResult
Managed Vector Search Result interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ManagedVectorSearchResult } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface ManagedVectorSearchResult {
id: string;
score: number;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: 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. |
score | property | score: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ManagedVectorStoreAdapter
Managed Vector Store Adapter interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { ManagedVectorStoreAdapter } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface ManagedVectorStoreAdapter {
readonly id: string;
upsert(points: ManagedVectorPoint[], options?: ManagedVectorWriteOptions): Promise<void>;
delete(ids: string[], options?: ManagedVectorWriteOptions): Promise<void>;
search(request: ManagedVectorSearchRequest): Promise<ManagedVectorSearchResult[]>;
health(): Promise<ProviderHealth>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
delete | method | delete(ids: string[], options?: ManagedVectorWriteOptions): Promise<void> | 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. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
search | method | search(request: ManagedVectorSearchRequest): Promise<ManagedVectorSearchResult[]> | Public method; parameters and return type are shown in the signature. |
upsert | method | upsert(points: ManagedVectorPoint[], options?: ManagedVectorWriteOptions): Promise<void> | Public method; parameters and return type are shown in the signature. |
ManagedVectorWriteOptions
Managed Vector Write Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { ManagedVectorWriteOptions } from '@codesoul-co/hypha-memory'; - Source module:
index-outbox
Declaration
export interface ManagedVectorWriteOptions {
fencingToken?: number;
memoryRevision?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fencingToken | property | fencingToken?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryRevision | property | memoryRevision?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
