@codesoul-co/hypha-memory / provider-operational-health
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/provider-operational-health.ts - Exports: 7
Using this module
Use the Provider operational health module for binding external or local providers to Hypha ports. It exports 1 class, 4 interfaces, 2 types.
Import from the package entrypoint
ts
import {
MemoryOperationalHealthService,
} from '@codesoul-co/hypha-memory';
import type {
MemoryOperationalHealth,
ProviderOperationalProbe,
ProviderOperationalSnapshot,
ProviderRuntimeMetrics,
LivenessStatus,
OperationalStatus,
} 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 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
MemoryOperationalHealthService | class | new MemoryOperationalHealthService(probes: ProviderOperationalProbe[], now?: () => string): MemoryOperationalHealthService | Memory Operational Health Service class with 2 public constructor or member entries; its exact declarations are listed below. |
MemoryOperationalHealth | interface | interface MemoryOperationalHealth | Memory Operational Health interface with 4 public fields or methods. |
ProviderOperationalProbe | interface | interface ProviderOperationalProbe | Provider Operational Probe interface with 4 public fields or methods. |
ProviderOperationalSnapshot | interface | interface ProviderOperationalSnapshot | Provider Operational Snapshot interface with 4 public fields or methods. |
ProviderRuntimeMetrics | interface | interface ProviderRuntimeMetrics | Provider Runtime Metrics interface with 11 public fields or methods. |
LivenessStatus | type | type LivenessStatus = 'alive' | 'stalled' | Public type alias for Liveness Status; the declaration contains its complete type expression. |
OperationalStatus | type | type OperationalStatus = 'ready' | 'degraded' | 'not_ready' | Public type alias for Operational Status; the declaration contains its complete type expression. |
MemoryOperationalHealthService
Memory Operational Health Service class with 2 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MemoryOperationalHealthService } from '@codesoul-co/hypha-memory'; - Source module:
provider-operational-health
Declaration
text
export declare class MemoryOperationalHealthService {
constructor(probes: ProviderOperationalProbe[], now?: () => string);
snapshot(signal?: AbortSignal): Promise<MemoryOperationalHealth>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (probes: ProviderOperationalProbe[], now?: () => string): MemoryOperationalHealthService | Creates an instance of this class. |
snapshot | method | snapshot(signal?: AbortSignal): Promise<MemoryOperationalHealth> | Public method; parameters and return type are shown in the signature. |
MemoryOperationalHealth
Memory Operational Health interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryOperationalHealth } from '@codesoul-co/hypha-memory'; - Source module:
provider-operational-health
Declaration
text
export interface MemoryOperationalHealth {
readiness: {
status: OperationalStatus;
reasons: string[];
};
liveness: {
status: LivenessStatus;
reasons: string[];
};
providers: ProviderOperationalSnapshot[];
checkedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
checkedAt | property | checkedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
liveness | property | liveness: { status: LivenessStatus; reasons: string[]; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
providers | property | providers: ProviderOperationalSnapshot[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
readiness | property | readiness: { status: OperationalStatus; reasons: string[]; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
ProviderOperationalProbe
Provider Operational Probe interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ProviderOperationalProbe } from '@codesoul-co/hypha-memory'; - Source module:
provider-operational-health
Declaration
text
export interface ProviderOperationalProbe {
readonly providerId: string;
readonly required: boolean;
health(signal?: AbortSignal): Promise<ProviderHealth>;
metrics(): Promise<ProviderRuntimeMetrics>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
health | method | health(signal?: AbortSignal): Promise<ProviderHealth> | Public method; parameters and return type are shown in the signature. |
metrics | method | metrics(): Promise<ProviderRuntimeMetrics> | Public method; parameters and return type are shown in the signature. |
providerId | property | readonly providerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
required | property | readonly required: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
ProviderOperationalSnapshot
Provider Operational Snapshot interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ProviderOperationalSnapshot } from '@codesoul-co/hypha-memory'; - Source module:
provider-operational-health
Declaration
text
export interface ProviderOperationalSnapshot {
providerId: string;
health: ProviderHealth;
metrics: ProviderRuntimeMetrics;
required: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
health | property | health: ProviderHealth | Public property; its type, readonly modifier and optionality are shown in the signature. |
metrics | property | metrics: ProviderRuntimeMetrics | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerId | property | providerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
required | property | required: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
ProviderRuntimeMetrics
Provider Runtime Metrics interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { ProviderRuntimeMetrics } from '@codesoul-co/hypha-memory'; - Source module:
provider-operational-health
Declaration
text
export interface ProviderRuntimeMetrics {
poolActive?: number;
poolIdle?: number;
poolLimit?: number;
queueDepth?: number;
queueOldestAgeMs?: number;
retryAttempts?: number;
retryBudgetRemaining?: number;
circuitState?: 'closed' | 'open' | 'half_open';
rateLimitRemaining?: number;
quarantinedOperations?: number;
deadLetterCount?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
circuitState | property | circuitState?: "closed" | "open" | "half_open" | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadLetterCount | property | deadLetterCount?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
poolActive | property | poolActive?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
poolIdle | property | poolIdle?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
poolLimit | property | poolLimit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
quarantinedOperations | property | quarantinedOperations?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
queueDepth | property | queueDepth?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
queueOldestAgeMs | property | queueOldestAgeMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
rateLimitRemaining | property | rateLimitRemaining?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryAttempts | property | retryAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryBudgetRemaining | property | retryBudgetRemaining?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
LivenessStatus
Public type alias for Liveness Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { LivenessStatus } from '@codesoul-co/hypha-memory'; - Source module:
provider-operational-health
Declaration
text
export type LivenessStatus = 'alive' | 'stalled';OperationalStatus
Public type alias for Operational Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { OperationalStatus } from '@codesoul-co/hypha-memory'; - Source module:
provider-operational-health
Declaration
text
export type OperationalStatus = 'ready' | 'degraded' | 'not_ready';