@codesoul-co/hypha-core / contracts/recovery
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/recovery.ts - Exports: 23
Using this module
Use the Recovery module for declaring and runtime-validating contracts. It exports 4 constants, 5 functions, 9 interfaces, 5 types.
Import from the package entrypoint
import {
defaultRecoveryConvergencePolicy,
RECOVERY_CATEGORIES,
RECOVERY_MODULES,
RECOVERY_STRATEGIES,
recoveryEvidenceHash,
recoveryFailureFingerprint,
recoveryKnowledgeKeyMatches,
recoveryKnowledgeScopeMatches,
} from '@codesoul-co/hypha-core';
import type {
RecoveryAttemptRecord,
RecoveryCaseSnapshot,
RecoveryConvergencePolicy,
RecoveryEvidence,
RecoveryFailure,
RecoveryKnowledge,
RecoveryKnowledgeKey,
RecoveryKnowledgePort,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 14 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 5 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 4 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
defaultRecoveryConvergencePolicy | constant | const defaultRecoveryConvergencePolicy: RecoveryConvergencePolicy | Default Recovery Convergence Policy constant exported by the contracts/recovery module. |
RECOVERY_CATEGORIES | constant | const RECOVERY_CATEGORIES: readonly ["validation", "policy_denied", "authentication", "authorization", "rate_limit", "timeout", "transient_dependency", "permanent_dependency", "concurrency_conflict", "resource_exhausted", "tool_failure", "inference_failure", "memory_failure", "execution_failure", "storage_failure", "message_failure", "cache_failure", "invariant_violation", "cancellation", "unknown"] | RECOVERY CATEGORIES constant exported by the contracts/recovery module. |
RECOVERY_MODULES | constant | const RECOVERY_MODULES: readonly ["fsm", "inference", "tool", "memory", "execution", "mcp", "workspace", "storage", "message_bus", "cache", "policy", "domain", "unknown"] | RECOVERY MODULES constant exported by the contracts/recovery module. |
RECOVERY_STRATEGIES | constant | const RECOVERY_STRATEGIES: readonly ["retry", "reconcile", "fallback", "degrade", "compensate", "wait", "human_review", "quarantine", "fail", "cancel"] | RECOVERY STRATEGIES constant exported by the contracts/recovery module. |
recoveryEvidenceHash | function | recoveryEvidenceHash(evidence: RecoveryEvidence): string | Recovery Evidence Hash function with 1 public call signature; parameters and return types are listed below. |
recoveryFailureFingerprint | function | recoveryFailureFingerprint(failure: RecoveryFailure): string | Recovery Failure Fingerprint function with 1 public call signature; parameters and return types are listed below. |
recoveryKnowledgeKeyMatches | function | recoveryKnowledgeKeyMatches(expected: RecoveryKnowledgeKey, actual: RecoveryKnowledgeKey): boolean | Recovery Knowledge Key Matches function with 1 public call signature; parameters and return types are listed below. |
recoveryKnowledgeScopeMatches | function | recoveryKnowledgeScopeMatches(expected: RecoveryKnowledgeScope | undefined, actual: RecoveryKnowledgeScope | undefined): boolean | Recovery Knowledge Scope Matches function with 1 public call signature; parameters and return types are listed below. |
stableRecoveryHash | function | stableRecoveryHash(value: unknown): string | Stable Recovery Hash function with 1 public call signature; parameters and return types are listed below. |
RecoveryAttemptRecord | interface | interface RecoveryAttemptRecord | Recovery Attempt Record interface with 12 public fields or methods. |
RecoveryCaseSnapshot | interface | interface RecoveryCaseSnapshot | Recovery Case Snapshot interface with 15 public fields or methods. |
RecoveryConvergencePolicy | interface | interface RecoveryConvergencePolicy | Recovery Convergence Policy interface with 6 public fields or methods. |
RecoveryEvidence | interface | interface RecoveryEvidence | Facts that can prove whether a recovery attempt changed the underlying state. Callers should prefer stable revisions, receipts, checksums, and provider state over human-readable messages. |
RecoveryFailure | interface | interface RecoveryFailure | Recovery Failure interface with 14 public fields or methods. |
RecoveryKnowledge | interface | interface RecoveryKnowledge | Recovery Knowledge interface with 7 public fields or methods. |
RecoveryKnowledgeKey | interface | interface RecoveryKnowledgeKey | Recovery Knowledge Key interface with 6 public fields or methods. |
RecoveryKnowledgePort | interface | interface RecoveryKnowledgePort | Cache implementations are hints only. The supervisor must revalidate a hit. |
RecoveryKnowledgeScope | interface | interface RecoveryKnowledgeScope | Recovery Knowledge Scope interface with 6 public fields or methods. |
RecoveryCaseStatus | type | type RecoveryCaseStatus = 'active' | 'suspended' | 'recovered' | 'degraded' | 'compensated' | 'quarantined' | 'failed' | 'cancelled' | Public type alias for Recovery Case Status; the declaration contains its complete type expression. |
RecoveryCategory | type | type RecoveryCategory = (typeof RECOVERY_CATEGORIES)[number] | Public type alias for Recovery Category; the declaration contains its complete type expression. |
RecoveryModule | type | type RecoveryModule = (typeof RECOVERY_MODULES)[number] | Public type alias for Recovery Module; the declaration contains its complete type expression. |
RecoverySideEffectState | type | type RecoverySideEffectState = 'none' | 'not_started' | 'committed' | 'unknown' | Public type alias for Recovery Side Effect State; the declaration contains its complete type expression. |
RecoveryStrategy | type | type RecoveryStrategy = (typeof RECOVERY_STRATEGIES)[number] | Public type alias for Recovery Strategy; the declaration contains its complete type expression. |
defaultRecoveryConvergencePolicy
Default Recovery Convergence Policy constant exported by the contracts/recovery module.
- Kind: constant
- Import:
import { defaultRecoveryConvergencePolicy } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare const defaultRecoveryConvergencePolicy: RecoveryConvergencePolicy;RECOVERY_CATEGORIES
RECOVERY CATEGORIES constant exported by the contracts/recovery module.
- Kind: constant
- Import:
import { RECOVERY_CATEGORIES } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare const RECOVERY_CATEGORIES: readonly ["validation", "policy_denied", "authentication", "authorization", "rate_limit", "timeout", "transient_dependency", "permanent_dependency", "concurrency_conflict", "resource_exhausted", "tool_failure", "inference_failure", "memory_failure", "execution_failure", "storage_failure", "message_failure", "cache_failure", "invariant_violation", "cancellation", "unknown"];RECOVERY_MODULES
RECOVERY MODULES constant exported by the contracts/recovery module.
- Kind: constant
- Import:
import { RECOVERY_MODULES } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare const RECOVERY_MODULES: readonly ["fsm", "inference", "tool", "memory", "execution", "mcp", "workspace", "storage", "message_bus", "cache", "policy", "domain", "unknown"];RECOVERY_STRATEGIES
RECOVERY STRATEGIES constant exported by the contracts/recovery module.
- Kind: constant
- Import:
import { RECOVERY_STRATEGIES } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare const RECOVERY_STRATEGIES: readonly ["retry", "reconcile", "fallback", "degrade", "compensate", "wait", "human_review", "quarantine", "fail", "cancel"];recoveryEvidenceHash
Recovery Evidence Hash function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { recoveryEvidenceHash } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare function recoveryEvidenceHash(evidence: RecoveryEvidence): string;Call signature
recoveryEvidenceHash(evidence: RecoveryEvidence): stringParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
evidence | RecoveryEvidence | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
string - Description: The return contract is defined by the type shown above.
recoveryFailureFingerprint
Recovery Failure Fingerprint function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { recoveryFailureFingerprint } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare function recoveryFailureFingerprint(failure: RecoveryFailure): string;Call signature
recoveryFailureFingerprint(failure: RecoveryFailure): stringParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
failure | RecoveryFailure | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
string - Description: The return contract is defined by the type shown above.
recoveryKnowledgeKeyMatches
Recovery Knowledge Key Matches function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { recoveryKnowledgeKeyMatches } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare function recoveryKnowledgeKeyMatches(expected: RecoveryKnowledgeKey, actual: RecoveryKnowledgeKey): boolean;Call signature
recoveryKnowledgeKeyMatches(expected: RecoveryKnowledgeKey, actual: RecoveryKnowledgeKey): booleanParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expected | RecoveryKnowledgeKey | Yes | Required parameter; accepted values are defined by the type column. |
actual | RecoveryKnowledgeKey | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
boolean - Description: The return contract is defined by the type shown above.
recoveryKnowledgeScopeMatches
Recovery Knowledge Scope Matches function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { recoveryKnowledgeScopeMatches } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare function recoveryKnowledgeScopeMatches(expected: RecoveryKnowledgeScope | undefined, actual: RecoveryKnowledgeScope | undefined): boolean;Call signature
recoveryKnowledgeScopeMatches(expected: RecoveryKnowledgeScope | undefined, actual: RecoveryKnowledgeScope | undefined): booleanParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expected | RecoveryKnowledgeScope | Yes | Required parameter; accepted values are defined by the type column. |
actual | RecoveryKnowledgeScope | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
boolean - Description: The return contract is defined by the type shown above.
stableRecoveryHash
Stable Recovery Hash function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { stableRecoveryHash } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export declare function stableRecoveryHash(value: unknown): string;Call signature
stableRecoveryHash(value: unknown): stringParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
string - Description: The return contract is defined by the type shown above.
RecoveryAttemptRecord
Recovery Attempt Record interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { RecoveryAttemptRecord } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryAttemptRecord {
cycle: number;
participantId: string;
module: RecoveryModule;
strategy: RecoveryStrategy;
fingerprint: string;
startedAt: string;
completedAt?: string;
status: 'started' | 'succeeded' | 'failed' | 'no_progress' | 'skipped';
evidenceBeforeHash: string;
evidenceAfterHash?: string;
errorCode?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
completedAt | property | completedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
cycle | property | cycle: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
errorCode | property | errorCode?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
evidenceAfterHash | property | evidenceAfterHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
evidenceBeforeHash | property | evidenceBeforeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fingerprint | property | fingerprint: 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. |
module | property | module: "memory" | "domain" | "mcp" | "policy" | "workspace" | "tool" | "unknown" | "execution" | "fsm" | "inference" | "storage" | "message_bus" | "cache" | Public property; its type, readonly modifier and optionality are shown in the signature. |
participantId | property | participantId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
startedAt | property | startedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "failed" | "started" | "succeeded" | "no_progress" | "skipped" | Public property; its type, readonly modifier and optionality are shown in the signature. |
strategy | property | strategy: "fail" | "retry" | "human_review" | "reconcile" | "fallback" | "degrade" | "compensate" | "wait" | "quarantine" | "cancel" | Public property; its type, readonly modifier and optionality are shown in the signature. |
RecoveryCaseSnapshot
Recovery Case Snapshot interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { RecoveryCaseSnapshot } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryCaseSnapshot {
id: string;
runId: string;
fsmState: string;
rootFingerprint: string;
status: RecoveryCaseStatus;
openedAt: string;
updatedAt: string;
cycles: number;
noProgressCycles: number;
lastEvidenceHash: string;
lastFailure?: RecoveryFailure;
attempts: RecoveryAttemptRecord[];
outputs: Record<string, unknown>;
degradedParticipants: string[];
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempts | property | attempts: RecoveryAttemptRecord[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
cycles | property | cycles: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
degradedParticipants | property | degradedParticipants: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
fsmState | property | fsmState: 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. |
lastEvidenceHash | property | lastEvidenceHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastFailure | property | lastFailure?: RecoveryFailure | 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. |
noProgressCycles | property | noProgressCycles: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
openedAt | property | openedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
outputs | property | outputs: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
rootFingerprint | property | rootFingerprint: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: RecoveryCaseStatus | 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. |
RecoveryConvergencePolicy
Recovery Convergence Policy interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RecoveryConvergencePolicy } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryConvergencePolicy {
maxCycles: number;
maxNoProgressCycles: number;
maxSameStrategyAttempts: number;
maxElapsedMs: number;
onNoProgress: Extract<RecoveryStrategy, 'fallback' | 'degrade' | 'human_review' | 'quarantine' | 'fail'>;
onExhausted: Extract<RecoveryStrategy, 'human_review' | 'quarantine' | 'fail'>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
maxCycles | property | maxCycles: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxElapsedMs | property | maxElapsedMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxNoProgressCycles | property | maxNoProgressCycles: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxSameStrategyAttempts | property | maxSameStrategyAttempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
onExhausted | property | onExhausted: "fail" | "human_review" | "quarantine" | Public property; its type, readonly modifier and optionality are shown in the signature. |
onNoProgress | property | onNoProgress: "fail" | "human_review" | "fallback" | "degrade" | "quarantine" | Public property; its type, readonly modifier and optionality are shown in the signature. |
RecoveryEvidence
Facts that can prove whether a recovery attempt changed the underlying state. Callers should prefer stable revisions, receipts, checksums, and provider state over human-readable messages.
- Kind: interface
- Import:
import type { RecoveryEvidence } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryEvidence {
observedAt: string;
operationKey: string;
dependencyKey?: string;
state?: string;
revision?: string | number;
receiptStatus?: 'accepted' | 'completed' | 'rejected' | 'unknown';
idempotencyKey?: string;
inputHash?: string;
outputHash?: string;
policyRevision?: string;
specRevision?: string;
providerRevision?: string;
sourceHashes?: Record<string, string>;
markers?: Record<string, string | number | boolean | null>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
dependencyKey | property | dependencyKey?: 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. |
inputHash | property | inputHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
markers | property | markers?: Record<string, string | number | boolean> | Public property; its type, readonly modifier and optionality are shown in the signature. |
observedAt | property | observedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationKey | property | operationKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
outputHash | property | outputHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
policyRevision | property | policyRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerRevision | property | providerRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
receiptStatus | property | receiptStatus?: "unknown" | "accepted" | "completed" | "rejected" | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision?: string | number | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceHashes | property | sourceHashes?: Record<string, string> | Public property; its type, readonly modifier and optionality are shown in the signature. |
specRevision | property | specRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
state | property | state?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RecoveryFailure
Recovery Failure interface with 14 public fields or methods.
- Kind: interface
- Import:
import type { RecoveryFailure } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryFailure {
id: string;
module: RecoveryModule;
category: RecoveryCategory;
code: string;
message: string;
occurredAt: string;
retryable: boolean;
sideEffectState: RecoverySideEffectState;
compensationAvailable?: boolean;
retryAfterMs?: number;
circuitKey?: string;
rootCauseKey?: string;
evidence: RecoveryEvidence;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
category | property | category: "unknown" | "cancellation" | "timeout" | "validation" | "policy_denied" | "authentication" | "authorization" | "rate_limit" | "transient_dependency" | "permanent_dependency" | "concurrency_conflict" | "resource_exhausted" | "tool_failure" | "inference_failure" | "memory_failure" | "execution_failure" | "storage_failure" | "message_failure" | "cache_failure" | "invariant_violation" | Public property; its type, readonly modifier and optionality are shown in the signature. |
circuitKey | property | circuitKey?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
code | property | code: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
compensationAvailable | property | compensationAvailable?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
evidence | property | evidence: RecoveryEvidence | 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. |
message | property | message: 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. |
module | property | module: "memory" | "domain" | "mcp" | "policy" | "workspace" | "tool" | "unknown" | "execution" | "fsm" | "inference" | "storage" | "message_bus" | "cache" | 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. |
retryable | property | retryable: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryAfterMs | property | retryAfterMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
rootCauseKey | property | rootCauseKey?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sideEffectState | property | sideEffectState: RecoverySideEffectState | Public property; its type, readonly modifier and optionality are shown in the signature. |
RecoveryKnowledge
Recovery Knowledge interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { RecoveryKnowledge } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryKnowledge {
key: RecoveryKnowledgeKey;
strategy: RecoveryStrategy;
outcome: Extract<RecoveryCaseStatus, 'recovered' | 'degraded' | 'compensated' | 'failed'>;
evidenceHash: string;
learnedAt: string;
expiresAt?: string;
validation: {
status: 'verified' | 'negative';
sourceEventId?: string;
proof?: Record<string, unknown>;
};
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
evidenceHash | property | evidenceHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAt | property | expiresAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
key | property | key: RecoveryKnowledgeKey | Public property; its type, readonly modifier and optionality are shown in the signature. |
learnedAt | property | learnedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
outcome | property | outcome: "degraded" | "failed" | "recovered" | "compensated" | Public property; its type, readonly modifier and optionality are shown in the signature. |
strategy | property | strategy: "fail" | "retry" | "human_review" | "reconcile" | "fallback" | "degrade" | "compensate" | "wait" | "quarantine" | "cancel" | Public property; its type, readonly modifier and optionality are shown in the signature. |
validation | property | validation: { status: "verified" | "negative"; sourceEventId?: string; proof?: Record<string, unknown>; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
RecoveryKnowledgeKey
Recovery Knowledge Key interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RecoveryKnowledgeKey } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryKnowledgeKey {
fingerprint: string;
participantId: string;
/**
* New runtime writes always include scope. Absence is accepted only for
* legacy Provider migration and must not be persisted by strict adapters.
*/
scope?: RecoveryKnowledgeScope;
policyRevision?: string;
specRevision?: string;
providerRevision?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fingerprint | property | fingerprint: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
participantId | property | participantId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
policyRevision | property | policyRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerRevision | property | providerRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope?: RecoveryKnowledgeScope | New runtime writes always include scope. Absence is accepted only for legacy Provider migration and must not be persisted by strict adapters. |
specRevision | property | specRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RecoveryKnowledgePort
Cache implementations are hints only. The supervisor must revalidate a hit.
- Kind: interface
- Import:
import type { RecoveryKnowledgePort } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryKnowledgePort {
get(key: RecoveryKnowledgeKey): Promise<RecoveryKnowledge | null>;
put(knowledge: RecoveryKnowledge): Promise<void>;
invalidate(key: RecoveryKnowledgeKey, reason: string): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
get | method | get(key: RecoveryKnowledgeKey): Promise<RecoveryKnowledge | null> | Public method; parameters and return type are shown in the signature. |
invalidate | method | invalidate(key: RecoveryKnowledgeKey, reason: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
put | method | put(knowledge: RecoveryKnowledge): Promise<void> | Public method; parameters and return type are shown in the signature. |
RecoveryKnowledgeScope
Recovery Knowledge Scope interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RecoveryKnowledgeScope } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export interface RecoveryKnowledgeScope {
tenantId?: string;
userId: string;
workspaceId?: string;
sessionId?: string;
agentId?: string;
domainPackId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentId | property | agentId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
domainPackId | property | domainPackId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RecoveryCaseStatus
Public type alias for Recovery Case Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RecoveryCaseStatus } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export type RecoveryCaseStatus = 'active' | 'suspended' | 'recovered' | 'degraded' | 'compensated' | 'quarantined' | 'failed' | 'cancelled';RecoveryCategory
Public type alias for Recovery Category; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RecoveryCategory } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export type RecoveryCategory = (typeof RECOVERY_CATEGORIES)[number];RecoveryModule
Public type alias for Recovery Module; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RecoveryModule } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export type RecoveryModule = (typeof RECOVERY_MODULES)[number];RecoverySideEffectState
Public type alias for Recovery Side Effect State; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RecoverySideEffectState } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export type RecoverySideEffectState = 'none' | 'not_started' | 'committed' | 'unknown';RecoveryStrategy
Public type alias for Recovery Strategy; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RecoveryStrategy } from '@codesoul-co/hypha-core'; - Source module:
contracts/recovery
Declaration
export type RecoveryStrategy = (typeof RECOVERY_STRATEGIES)[number];