@codesoul-co/hypha-memory / dead-letter-management
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/dead-letter-management.ts - Exports: 10
Using this module
Use the Dead letter management module for using the public contracts and operations for this capability boundary. It exports 2 classes, 2 functions, 5 interfaces, 1 type.
Import from the package entrypoint
import {
InMemoryMemoryDeadLetterRepository,
MemoryDeadLetterManager,
deadLetterFromTask,
inspectMemoryLifecycleDeadLetters,
} from '@codesoul-co/hypha-memory';
import type {
DeadLetterDispositionRequest,
MemoryDeadLetterInspection,
MemoryDeadLetterQuery,
MemoryDeadLetterRecord,
MemoryDeadLetterRepository,
MemoryDeadLetterState,
} from '@codesoul-co/hypha-memory';Usage patterns
- Use the 6 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 2 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.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
InMemoryMemoryDeadLetterRepository | class | new InMemoryMemoryDeadLetterRepository(): InMemoryMemoryDeadLetterRepository | In Memory Memory Dead Letter Repository class with 4 public constructor or member entries; its exact declarations are listed below. |
MemoryDeadLetterManager | class | new MemoryDeadLetterManager(repository: MemoryDeadLetterRepository): MemoryDeadLetterManager | Memory Dead Letter Manager class with 4 public constructor or member entries; its exact declarations are listed below. |
deadLetterFromTask | function | deadLetterFromTask(task: MemoryLifecycleTask, occurredAt?: string): MemoryDeadLetterRecord | Dead Letter From Task function with 1 public call signature; parameters and return types are listed below. |
inspectMemoryLifecycleDeadLetters | function | inspectMemoryLifecycleDeadLetters(store: MemoryLifecycleTaskStore, query?: { workerType?: MemoryLifecycleWorkerType; scopeHash?: string; }): Promise<MemoryDeadLetterInspection[]> | Returns operator-safe DLQ metadata without exposing task payloads or Provider messages. |
DeadLetterDispositionRequest | interface | interface DeadLetterDispositionRequest | Dead Letter Disposition Request interface with 7 public fields or methods. |
MemoryDeadLetterInspection | interface | interface MemoryDeadLetterInspection | Memory Dead Letter Inspection interface with 9 public fields or methods. |
MemoryDeadLetterQuery | interface | interface MemoryDeadLetterQuery | Memory Dead Letter Query interface with 4 public fields or methods. |
MemoryDeadLetterRecord | interface | interface MemoryDeadLetterRecord | Memory Dead Letter Record interface with 14 public fields or methods. |
MemoryDeadLetterRepository | interface | interface MemoryDeadLetterRepository | Memory Dead Letter Repository interface with 3 public fields or methods. |
MemoryDeadLetterState | type | type MemoryDeadLetterState = 'dead_letter' | 'replay_queued' | 'discarded' | Public type alias for Memory Dead Letter State; the declaration contains its complete type expression. |
InMemoryMemoryDeadLetterRepository
In Memory Memory Dead Letter Repository class with 4 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { InMemoryMemoryDeadLetterRepository } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export declare class InMemoryMemoryDeadLetterRepository implements MemoryDeadLetterRepository {
get(id: string): Promise<MemoryDeadLetterRecord | null>;
list(query?: MemoryDeadLetterQuery): Promise<MemoryDeadLetterRecord[]>;
set(record: MemoryDeadLetterRecord): Promise<void>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (): InMemoryMemoryDeadLetterRepository | Creates an instance of this class. |
get | method | get(id: string): Promise<MemoryDeadLetterRecord | null> | Public method; parameters and return type are shown in the signature. |
list | method | list(query?: MemoryDeadLetterQuery): Promise<MemoryDeadLetterRecord[]> | Public method; parameters and return type are shown in the signature. |
set | method | set(record: MemoryDeadLetterRecord): Promise<void> | Public method; parameters and return type are shown in the signature. |
MemoryDeadLetterManager
Memory Dead Letter Manager class with 4 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MemoryDeadLetterManager } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export declare class MemoryDeadLetterManager {
constructor(repository: MemoryDeadLetterRepository);
query(input?: MemoryDeadLetterQuery): Promise<MemoryDeadLetterRecord[]>;
replay(request: DeadLetterDispositionRequest): Promise<MemoryDeadLetterRecord>;
discard(request: DeadLetterDispositionRequest): Promise<MemoryDeadLetterRecord>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (repository: MemoryDeadLetterRepository): MemoryDeadLetterManager | Creates an instance of this class. |
discard | method | discard(request: DeadLetterDispositionRequest): Promise<MemoryDeadLetterRecord> | Public method; parameters and return type are shown in the signature. |
query | method | query(input?: MemoryDeadLetterQuery): Promise<MemoryDeadLetterRecord[]> | Public method; parameters and return type are shown in the signature. |
replay | method | replay(request: DeadLetterDispositionRequest): Promise<MemoryDeadLetterRecord> | Public method; parameters and return type are shown in the signature. |
deadLetterFromTask
Dead Letter From Task function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { deadLetterFromTask } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export declare function deadLetterFromTask(task: MemoryLifecycleTask, occurredAt?: string): MemoryDeadLetterRecord;Call signature
deadLetterFromTask(task: MemoryLifecycleTask, occurredAt?: string): MemoryDeadLetterRecordParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task | MemoryLifecycleTask<unknown> | Yes | Required parameter; accepted values are defined by the type column. |
occurredAt | string | No | Optional parameter; accepted values are defined by the type column. |
Returns
- Type:
MemoryDeadLetterRecord - Description: The return contract is defined by the type shown above.
inspectMemoryLifecycleDeadLetters
Returns operator-safe DLQ metadata without exposing task payloads or Provider messages.
- Kind: function
- Import:
import { inspectMemoryLifecycleDeadLetters } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export declare function inspectMemoryLifecycleDeadLetters(store: MemoryLifecycleTaskStore, query?: {
workerType?: MemoryLifecycleWorkerType;
scopeHash?: string;
}): Promise<MemoryDeadLetterInspection[]>;Call signature
inspectMemoryLifecycleDeadLetters(store: MemoryLifecycleTaskStore, query?: { workerType?: MemoryLifecycleWorkerType; scopeHash?: string; }): Promise<MemoryDeadLetterInspection[]>Returns operator-safe DLQ metadata without exposing task payloads or Provider messages.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
store | MemoryLifecycleTaskStore | Yes | Required parameter; accepted values are defined by the type column. |
query | { workerType?: MemoryLifecycleWorkerType; scopeHash?: string; } | No | Optional parameter; accepted values are defined by the type column. |
Returns
- Type:
Promise<MemoryDeadLetterInspection[]> - Description: The return contract is defined by the type shown above.
DeadLetterDispositionRequest
Dead Letter Disposition Request interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { DeadLetterDispositionRequest } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export interface DeadLetterDispositionRequest {
deadLetterId: string;
actorId: string;
reason: string;
expectedFailureFingerprint: string;
confirmation: 'replay' | 'discard';
idempotencyKey?: string;
occurredAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
actorId | property | actorId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
confirmation | property | confirmation: "replay" | "discard" | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadLetterId | property | deadLetterId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedFailureFingerprint | property | expectedFailureFingerprint: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey?: string | 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. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryDeadLetterInspection
Memory Dead Letter Inspection interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { MemoryDeadLetterInspection } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export interface MemoryDeadLetterInspection {
taskId: string;
operationId: string;
workerType: MemoryLifecycleWorkerType;
scopeHash: string;
attempts: number;
error: Pick<NormalizedMemoryError, 'code' | 'retryable' | 'providerCode'>;
payloadHash: string;
createdAt: string;
updatedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempts | property | attempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
error | property | error: Pick<NormalizedMemoryError, "code" | "retryable" | "providerCode"> | 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. |
payloadHash | property | payloadHash: 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. |
taskId | property | taskId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workerType | property | workerType: MemoryLifecycleWorkerType | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryDeadLetterQuery
Memory Dead Letter Query interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryDeadLetterQuery } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export interface MemoryDeadLetterQuery {
workerType?: MemoryLifecycleWorkerType;
scopeHash?: string;
state?: MemoryDeadLetterState;
failureFingerprint?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
failureFingerprint | property | failureFingerprint?: 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. |
state | property | state?: MemoryDeadLetterState | Public property; its type, readonly modifier and optionality are shown in the signature. |
workerType | property | workerType?: MemoryLifecycleWorkerType | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryDeadLetterRecord
Memory Dead Letter Record interface with 14 public fields or methods.
- Kind: interface
- Import:
import type { MemoryDeadLetterRecord } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export interface MemoryDeadLetterRecord {
id: string;
taskId: string;
operationId: string;
workerType: MemoryLifecycleWorkerType;
scopeHash: string;
state: MemoryDeadLetterState;
attempts: number;
failure: NormalizedMemoryError;
failureFingerprint: string;
payload: unknown;
idempotencyKey?: string;
createdAt: string;
updatedAt: string;
disposition?: {
actorId: string;
reason: string;
occurredAt: string;
};
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempts | property | attempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
disposition | property | disposition?: { actorId: string; reason: string; occurredAt: string; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
failure | property | failure: NormalizedMemoryError | Public property; its type, readonly modifier and optionality are shown in the signature. |
failureFingerprint | property | failureFingerprint: string | 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. |
idempotencyKey | property | idempotencyKey?: 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. |
payload | property | payload: unknown | 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. |
state | property | state: MemoryDeadLetterState | Public property; its type, readonly modifier and optionality are shown in the signature. |
taskId | property | taskId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workerType | property | workerType: MemoryLifecycleWorkerType | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryDeadLetterRepository
Memory Dead Letter Repository interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryDeadLetterRepository } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export interface MemoryDeadLetterRepository {
get(id: string): Promise<MemoryDeadLetterRecord | null>;
list(query?: MemoryDeadLetterQuery): Promise<MemoryDeadLetterRecord[]>;
set(record: MemoryDeadLetterRecord): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
get | method | get(id: string): Promise<MemoryDeadLetterRecord | null> | Public method; parameters and return type are shown in the signature. |
list | method | list(query?: MemoryDeadLetterQuery): Promise<MemoryDeadLetterRecord[]> | Public method; parameters and return type are shown in the signature. |
set | method | set(record: MemoryDeadLetterRecord): Promise<void> | Public method; parameters and return type are shown in the signature. |
MemoryDeadLetterState
Public type alias for Memory Dead Letter State; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MemoryDeadLetterState } from '@codesoul-co/hypha-memory'; - Source module:
dead-letter-management
Declaration
export type MemoryDeadLetterState = 'dead_letter' | 'replay_queued' | 'discarded';