Skip to content

@codesoul-co/hypha-memory / memory-server-migration-acceptance

Using this module

Use the Memory server migration acceptance module for using the public contracts and operations for this capability boundary. It exports 4 functions, 8 interfaces.

Import from the package entrypoint

ts
import {
  runCanonicalConsumerMigrationAcceptance,
  runMemoryServerMigrationAcceptance,
  runPermanentMemoryMigrationAcceptance,
  runRedisWorkingMemoryMigrationAcceptance,
} from '@codesoul-co/hypha-memory';

import type {
  CanonicalMemoryConsumerObservation,
  MemoryMigrationObservationPort,
  MemoryServerMigrationAcceptancePorts,
  MemoryServerMigrationAcceptanceReport,
  MemoryServerMigrationFinding,
  MemoryServerMigrationSuiteReport,
  PermanentMemoryFailureObservation,
  RedisWorkingMemoryObservation,
} 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 4 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.

Public exports

SymbolKindSignatureDescription
runCanonicalConsumerMigrationAcceptancefunctionrunCanonicalConsumerMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts["canonicalConsumer"], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>Run Canonical Consumer Migration Acceptance function with 1 public call signature; parameters and return types are listed below.
runMemoryServerMigrationAcceptancefunctionrunMemoryServerMigrationAcceptance(ports: MemoryServerMigrationAcceptancePorts, acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationAcceptanceReport>Run Memory Server Migration Acceptance function with 1 public call signature; parameters and return types are listed below.
runPermanentMemoryMigrationAcceptancefunctionrunPermanentMemoryMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts["permanentMemory"], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>Run Permanent Memory Migration Acceptance function with 1 public call signature; parameters and return types are listed below.
runRedisWorkingMemoryMigrationAcceptancefunctionrunRedisWorkingMemoryMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts["redisWorkingMemory"], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>Run Redis Working Memory Migration Acceptance function with 1 public call signature; parameters and return types are listed below.
CanonicalMemoryConsumerObservationinterfaceinterface CanonicalMemoryConsumerObservationCanonical Memory Consumer Observation interface with 9 public fields or methods.
MemoryMigrationObservationPortinterfaceinterface MemoryMigrationObservationPortMemory Migration Observation Port interface with 1 public fields or methods.
MemoryServerMigrationAcceptancePortsinterfaceinterface MemoryServerMigrationAcceptancePortsMemory Server Migration Acceptance Ports interface with 3 public fields or methods.
MemoryServerMigrationAcceptanceReportinterfaceinterface MemoryServerMigrationAcceptanceReportMemory Server Migration Acceptance Report interface with 3 public fields or methods.
MemoryServerMigrationFindinginterfaceinterface MemoryServerMigrationFindingMemory Server Migration Finding interface with 3 public fields or methods.
MemoryServerMigrationSuiteReportinterfaceinterface MemoryServerMigrationSuiteReportMemory Server Migration Suite Report interface with 3 public fields or methods.
PermanentMemoryFailureObservationinterfaceinterface PermanentMemoryFailureObservationPermanent Memory Failure Observation interface with 4 public fields or methods.
RedisWorkingMemoryObservationinterfaceinterface RedisWorkingMemoryObservationRedis Working Memory Observation interface with 3 public fields or methods.

runCanonicalConsumerMigrationAcceptance

Run Canonical Consumer Migration Acceptance function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function runCanonicalConsumerMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts['canonicalConsumer'], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>;

Call signature

text
runCanonicalConsumerMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts["canonicalConsumer"], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>

Parameters

ParameterTypeRequiredDescription
portMemoryMigrationObservationPort<CanonicalMemoryConsumerObservation>YesRequired parameter; accepted values are defined by the type column.
acceptanceMemoryServerMigrationAcceptanceNoOptional parameter; accepted values are defined by the type column.

Returns

  • Type: Promise<MemoryServerMigrationSuiteReport>
  • Description: The return contract is defined by the type shown above.

runMemoryServerMigrationAcceptance

Run Memory Server Migration Acceptance function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function runMemoryServerMigrationAcceptance(ports: MemoryServerMigrationAcceptancePorts, acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationAcceptanceReport>;

Call signature

text
runMemoryServerMigrationAcceptance(ports: MemoryServerMigrationAcceptancePorts, acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationAcceptanceReport>

Parameters

ParameterTypeRequiredDescription
portsMemoryServerMigrationAcceptancePortsYesRequired parameter; accepted values are defined by the type column.
acceptanceMemoryServerMigrationAcceptanceNoOptional parameter; accepted values are defined by the type column.

Returns

  • Type: Promise<MemoryServerMigrationAcceptanceReport>
  • Description: The return contract is defined by the type shown above.

runPermanentMemoryMigrationAcceptance

Run Permanent Memory Migration Acceptance function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function runPermanentMemoryMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts['permanentMemory'], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>;

Call signature

text
runPermanentMemoryMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts["permanentMemory"], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>

Parameters

ParameterTypeRequiredDescription
portMemoryMigrationObservationPort<PermanentMemoryFailureObservation>YesRequired parameter; accepted values are defined by the type column.
acceptanceMemoryServerMigrationAcceptanceNoOptional parameter; accepted values are defined by the type column.

Returns

  • Type: Promise<MemoryServerMigrationSuiteReport>
  • Description: The return contract is defined by the type shown above.

runRedisWorkingMemoryMigrationAcceptance

Run Redis Working Memory Migration Acceptance function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function runRedisWorkingMemoryMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts['redisWorkingMemory'], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>;

Call signature

text
runRedisWorkingMemoryMigrationAcceptance(port: MemoryServerMigrationAcceptancePorts["redisWorkingMemory"], acceptance?: MemoryServerMigrationAcceptance): Promise<MemoryServerMigrationSuiteReport>

Parameters

ParameterTypeRequiredDescription
portMemoryMigrationObservationPort<RedisWorkingMemoryObservation>YesRequired parameter; accepted values are defined by the type column.
acceptanceMemoryServerMigrationAcceptanceNoOptional parameter; accepted values are defined by the type column.

Returns

  • Type: Promise<MemoryServerMigrationSuiteReport>
  • Description: The return contract is defined by the type shown above.

CanonicalMemoryConsumerObservation

Canonical Memory Consumer Observation interface with 9 public fields or methods.

Declaration

text
export interface CanonicalMemoryConsumerObservation {
    compositionReceipt?: MemoryRuntimeCompositionReceipt;
    consumerServiceInstanceIds: Partial<Record<MemoryServerConsumer, string>>;
    serviceRegistrationCount: number;
    runtimeDependencies: readonly string[];
    unresolvedDependencyRefs: readonly string[];
    directStoreConsumers: readonly MemoryServerConsumer[];
    secondWritePaths: readonly string[];
    profileSwitches: readonly CanonicalProfileSwitchObservation[];
    legacyAdapterResponsibilities: readonly string[];
}

Contract members

MemberKindSignatureDescription
compositionReceiptpropertycompositionReceipt?: MemoryRuntimeCompositionReceiptPublic property; its type, readonly modifier and optionality are shown in the signature.
consumerServiceInstanceIdspropertyconsumerServiceInstanceIds: Partial<Record<MemoryServerConsumer, string>>Public property; its type, readonly modifier and optionality are shown in the signature.
directStoreConsumerspropertydirectStoreConsumers: readonly MemoryServerConsumer[]Public property; its type, readonly modifier and optionality are shown in the signature.
legacyAdapterResponsibilitiespropertylegacyAdapterResponsibilities: readonly string[]Public property; its type, readonly modifier and optionality are shown in the signature.
profileSwitchespropertyprofileSwitches: readonly CanonicalProfileSwitchObservation[]Public property; its type, readonly modifier and optionality are shown in the signature.
runtimeDependenciespropertyruntimeDependencies: readonly string[]Public property; its type, readonly modifier and optionality are shown in the signature.
secondWritePathspropertysecondWritePaths: readonly string[]Public property; its type, readonly modifier and optionality are shown in the signature.
serviceRegistrationCountpropertyserviceRegistrationCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
unresolvedDependencyRefspropertyunresolvedDependencyRefs: readonly string[]Public property; its type, readonly modifier and optionality are shown in the signature.

MemoryMigrationObservationPort

Memory Migration Observation Port interface with 1 public fields or methods.

Declaration

text
export interface MemoryMigrationObservationPort<T> {
    observe(fixture: MemoryServerMigrationSharedFixture): Promise<T>;
}

Contract members

MemberKindSignatureDescription
observemethodobserve(fixture: MemoryServerMigrationSharedFixture): Promise<T>Public method; parameters and return type are shown in the signature.

MemoryServerMigrationAcceptancePorts

Memory Server Migration Acceptance Ports interface with 3 public fields or methods.

Declaration

text
export interface MemoryServerMigrationAcceptancePorts {
    canonicalConsumer: MemoryMigrationObservationPort<CanonicalMemoryConsumerObservation>;
    redisWorkingMemory: MemoryMigrationObservationPort<RedisWorkingMemoryObservation>;
    permanentMemory: MemoryMigrationObservationPort<PermanentMemoryFailureObservation>;
}

Contract members

MemberKindSignatureDescription
canonicalConsumerpropertycanonicalConsumer: MemoryMigrationObservationPort<CanonicalMemoryConsumerObservation>Public property; its type, readonly modifier and optionality are shown in the signature.
permanentMemorypropertypermanentMemory: MemoryMigrationObservationPort<PermanentMemoryFailureObservation>Public property; its type, readonly modifier and optionality are shown in the signature.
redisWorkingMemorypropertyredisWorkingMemory: MemoryMigrationObservationPort<RedisWorkingMemoryObservation>Public property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerMigrationAcceptanceReport

Memory Server Migration Acceptance Report interface with 3 public fields or methods.

Declaration

text
export interface MemoryServerMigrationAcceptanceReport {
    contractRef: MemoryServerMigrationAcceptance['contractRef'];
    passed: boolean;
    suites: readonly MemoryServerMigrationSuiteReport[];
}

Contract members

MemberKindSignatureDescription
contractRefpropertycontractRef: import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/contracts").MemoryContractSpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
passedpropertypassed: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
suitespropertysuites: readonly MemoryServerMigrationSuiteReport[]Public property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerMigrationFinding

Memory Server Migration Finding interface with 3 public fields or methods.

Declaration

text
export interface MemoryServerMigrationFinding {
    issue: MemoryServerMigrationIssue;
    code: string;
    message: string;
}

Contract members

MemberKindSignatureDescription
codepropertycode: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
issuepropertyissue: MemoryServerMigrationIssuePublic property; its type, readonly modifier and optionality are shown in the signature.
messagepropertymessage: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerMigrationSuiteReport

Memory Server Migration Suite Report interface with 3 public fields or methods.

Declaration

text
export interface MemoryServerMigrationSuiteReport {
    issue: MemoryServerMigrationIssue;
    passed: boolean;
    findings: MemoryServerMigrationFinding[];
}

Contract members

MemberKindSignatureDescription
findingspropertyfindings: MemoryServerMigrationFinding[]Public property; its type, readonly modifier and optionality are shown in the signature.
issuepropertyissue: MemoryServerMigrationIssuePublic property; its type, readonly modifier and optionality are shown in the signature.
passedpropertypassed: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

PermanentMemoryFailureObservation

Permanent Memory Failure Observation interface with 4 public fields or methods.

Declaration

text
export interface PermanentMemoryFailureObservation {
    notFoundReturnsEmpty: boolean;
    providerFailureResult: 'normalized_error' | 'empty_result' | 'success';
    normalizedFailure?: NormalizedMemoryError;
    failureDisposition: 'retry_reconcile_quarantine_or_dlq' | 'empty_result' | 'none';
}

Contract members

MemberKindSignatureDescription
failureDispositionpropertyfailureDisposition: "none" | "retry_reconcile_quarantine_or_dlq" | "empty_result"Public property; its type, readonly modifier and optionality are shown in the signature.
normalizedFailurepropertynormalizedFailure?: NormalizedMemoryErrorPublic property; its type, readonly modifier and optionality are shown in the signature.
notFoundReturnsEmptypropertynotFoundReturnsEmpty: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
providerFailureResultpropertyproviderFailureResult: "normalized_error" | "success" | "empty_result"Public property; its type, readonly modifier and optionality are shown in the signature.

RedisWorkingMemoryObservation

Redis Working Memory Observation interface with 3 public fields or methods.

Declaration

text
export interface RedisWorkingMemoryObservation {
    trimArgumentSemantics: 'target_max_length' | 'deletion_count';
    newestReadStrategy: 'reverse_range' | 'forward_range' | 'reliable_metadata';
    cleanupStrategy: 'scan' | 'keys';
}

Contract members

MemberKindSignatureDescription
cleanupStrategypropertycleanupStrategy: "scan" | "keys"Public property; its type, readonly modifier and optionality are shown in the signature.
newestReadStrategypropertynewestReadStrategy: "reverse_range" | "forward_range" | "reliable_metadata"Public property; its type, readonly modifier and optionality are shown in the signature.
trimArgumentSemanticspropertytrimArgumentSemantics: "target_max_length" | "deletion_count"Public property; its type, readonly modifier and optionality are shown in the signature.