Skip to content

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

Using this module

Use the Memory server migration package module for using the public contracts and operations for this capability boundary. It exports 1 constant, 4 functions, 9 interfaces, 2 types.

Import from the package entrypoint

ts
import {
  memoryServerMigrationPackageSpec,
  lifecycleFailureError,
  runMemoryServerMigrationPackageAcceptance,
  runMigrationStateMachineAcceptance,
  runRuntimeLifecycleAcceptance,
} from '@codesoul-co/hypha-memory';

import type {
  MemoryServerLifecycleFailureEvidence,
  MemoryServerMigrationPackageFinding,
  MemoryServerMigrationPackagePorts,
  MemoryServerMigrationPackageReport,
  MemoryServerMigrationPackageSpec,
  MemoryServerMigrationPackageSuiteReport,
  MemoryServerMigrationStateMachinePort,
  MemoryServerRuntimeLifecycleEvidence,
} from '@codesoul-co/hypha-memory';

// The complete export list is documented below.

Usage patterns

  • Use the 11 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.
  • The 1 constant/enum export provides stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Public exports

SymbolKindSignatureDescription
memoryServerMigrationPackageSpecconstantconst memoryServerMigrationPackageSpec: MemoryServerMigrationPackageSpecMemory Server Migration Package Spec constant exported by the memory-server-migration-package module.
lifecycleFailureErrorfunctionlifecycleFailureError(point: MemoryServerLifecycleFailurePoint): NormalizedMemoryErrorLifecycle Failure Error function with 1 public call signature; parameters and return types are listed below.
runMemoryServerMigrationPackageAcceptancefunctionrunMemoryServerMigrationPackageAcceptance(ports: MemoryServerMigrationPackagePorts, spec?: MemoryServerMigrationPackageSpec): Promise<MemoryServerMigrationPackageReport>Run Memory Server Migration Package Acceptance function with 1 public call signature; parameters and return types are listed below.
runMigrationStateMachineAcceptancefunctionrunMigrationStateMachineAcceptance(port: MemoryServerMigrationStateMachinePort): Promise<MemoryServerMigrationPackageSuiteReport>Run Migration State Machine Acceptance function with 1 public call signature; parameters and return types are listed below.
runRuntimeLifecycleAcceptancefunctionrunRuntimeLifecycleAcceptance(port: MemoryServerRuntimeLifecyclePort, spec?: MemoryServerMigrationPackageSpec): Promise<MemoryServerMigrationPackageSuiteReport>Run Runtime Lifecycle Acceptance function with 1 public call signature; parameters and return types are listed below.
MemoryServerLifecycleFailureEvidenceinterfaceinterface MemoryServerLifecycleFailureEvidenceMemory Server Lifecycle Failure Evidence interface with 5 public fields or methods.
MemoryServerMigrationPackageFindinginterfaceinterface MemoryServerMigrationPackageFindingMemory Server Migration Package Finding interface with 4 public fields or methods.
MemoryServerMigrationPackagePortsinterfaceinterface MemoryServerMigrationPackagePortsMemory Server Migration Package Ports interface with 5 public fields or methods.
MemoryServerMigrationPackageReportinterfaceinterface MemoryServerMigrationPackageReportMemory Server Migration Package Report interface with 4 public fields or methods.
MemoryServerMigrationPackageSpecinterfaceinterface MemoryServerMigrationPackageSpecMemory Server Migration Package Spec interface with 4 public fields or methods.
MemoryServerMigrationPackageSuiteReportinterfaceinterface MemoryServerMigrationPackageSuiteReportMemory Server Migration Package Suite Report interface with 4 public fields or methods.
MemoryServerMigrationStateMachinePortinterfaceinterface MemoryServerMigrationStateMachinePortMemory Server Migration State Machine Port interface with 2 public fields or methods.
MemoryServerRuntimeLifecycleEvidenceinterfaceinterface MemoryServerRuntimeLifecycleEvidenceMemory Server Runtime Lifecycle Evidence interface with 5 public fields or methods.
MemoryServerRuntimeLifecyclePortinterfaceinterface MemoryServerRuntimeLifecyclePortMemory Server Runtime Lifecycle Port interface with 1 public fields or methods.
MemoryServerLifecycleFailurePointtypetype MemoryServerLifecycleFailurePoint = (typeof memoryServerMigrationPackageSpec.lifecycleFailurePoints)[number]Public type alias for Memory Server Lifecycle Failure Point; the declaration contains its complete type expression.
MemoryServerMigrationPackageSuiteIdtypetype MemoryServerMigrationPackageSuiteId = 'consumer_contract' | 'redis_behavior' | 'permanent_behavior' | 'migration_state_machine' | 'runtime_lifecycle'Public type alias for Memory Server Migration Package Suite ID; the declaration contains its complete type expression.

memoryServerMigrationPackageSpec

Memory Server Migration Package Spec constant exported by the memory-server-migration-package module.

Declaration

text
export declare const memoryServerMigrationPackageSpec: MemoryServerMigrationPackageSpec;

lifecycleFailureError

Lifecycle Failure Error function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function lifecycleFailureError(point: MemoryServerLifecycleFailurePoint): NormalizedMemoryError;

Call signature

text
lifecycleFailureError(point: MemoryServerLifecycleFailurePoint): NormalizedMemoryError

Parameters

ParameterTypeRequiredDescription
point"provider_create" | "capability_negotiation" | "health_check" | "activity_registration"YesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: NormalizedMemoryError
  • Description: The return contract is defined by the type shown above.

runMemoryServerMigrationPackageAcceptance

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

Declaration

text
export declare function runMemoryServerMigrationPackageAcceptance(ports: MemoryServerMigrationPackagePorts, spec?: MemoryServerMigrationPackageSpec): Promise<MemoryServerMigrationPackageReport>;

Call signature

text
runMemoryServerMigrationPackageAcceptance(ports: MemoryServerMigrationPackagePorts, spec?: MemoryServerMigrationPackageSpec): Promise<MemoryServerMigrationPackageReport>

Parameters

ParameterTypeRequiredDescription
portsMemoryServerMigrationPackagePortsYesRequired parameter; accepted values are defined by the type column.
specMemoryServerMigrationPackageSpecNoOptional parameter; accepted values are defined by the type column.

Returns

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

runMigrationStateMachineAcceptance

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

Declaration

text
export declare function runMigrationStateMachineAcceptance(port: MemoryServerMigrationStateMachinePort): Promise<MemoryServerMigrationPackageSuiteReport>;

Call signature

text
runMigrationStateMachineAcceptance(port: MemoryServerMigrationStateMachinePort): Promise<MemoryServerMigrationPackageSuiteReport>

Parameters

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

Returns

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

runRuntimeLifecycleAcceptance

Run Runtime Lifecycle Acceptance function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function runRuntimeLifecycleAcceptance(port: MemoryServerRuntimeLifecyclePort, spec?: MemoryServerMigrationPackageSpec): Promise<MemoryServerMigrationPackageSuiteReport>;

Call signature

text
runRuntimeLifecycleAcceptance(port: MemoryServerRuntimeLifecyclePort, spec?: MemoryServerMigrationPackageSpec): Promise<MemoryServerMigrationPackageSuiteReport>

Parameters

ParameterTypeRequiredDescription
portMemoryServerRuntimeLifecyclePortYesRequired parameter; accepted values are defined by the type column.
specMemoryServerMigrationPackageSpecNoOptional parameter; accepted values are defined by the type column.

Returns

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

MemoryServerLifecycleFailureEvidence

Memory Server Lifecycle Failure Evidence interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { MemoryServerLifecycleFailureEvidence } from '@codesoul-co/hypha-memory';
  • Source module: memory-server-migration-package

Declaration

text
export interface MemoryServerLifecycleFailureEvidence {
    point: MemoryServerLifecycleFailurePoint;
    rejected: boolean;
    resourcesCreated: number;
    resourcesClosed: number;
    openHandleCount: number;
}

Contract members

MemberKindSignatureDescription
openHandleCountpropertyopenHandleCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
pointpropertypoint: "provider_create" | "capability_negotiation" | "health_check" | "activity_registration"Public property; its type, readonly modifier and optionality are shown in the signature.
rejectedpropertyrejected: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
resourcesClosedpropertyresourcesClosed: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
resourcesCreatedpropertyresourcesCreated: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerMigrationPackageFinding

Memory Server Migration Package Finding interface with 4 public fields or methods.

Declaration

text
export interface MemoryServerMigrationPackageFinding {
    code: string;
    message: string;
    fixtureId?: string;
    issue?: string;
}

Contract members

MemberKindSignatureDescription
codepropertycode: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
fixtureIdpropertyfixtureId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
issuepropertyissue?: stringPublic 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.

MemoryServerMigrationPackagePorts

Memory Server Migration Package Ports interface with 5 public fields or methods.

Declaration

text
export interface MemoryServerMigrationPackagePorts {
    contract: MemoryServerMigrationAcceptancePorts;
    redisBehavior: WorkingMemoryMigrationHarnessFactory;
    permanentBehavior: PermanentMemoryMigrationHarnessFactory;
    migrationStateMachine: MemoryServerMigrationStateMachinePort;
    runtimeLifecycle: MemoryServerRuntimeLifecyclePort;
}

Contract members

MemberKindSignatureDescription
contractpropertycontract: MemoryServerMigrationAcceptancePortsPublic property; its type, readonly modifier and optionality are shown in the signature.
migrationStateMachinepropertymigrationStateMachine: MemoryServerMigrationStateMachinePortPublic property; its type, readonly modifier and optionality are shown in the signature.
permanentBehaviormethodpermanentBehavior(fixture: import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/memory-server-permanent-migration-fixtures").PermanentMemoryFailureFixture): import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/memory-server-permanent-migration-fixtures").PermanentMemoryMigrationAcceptanceHarnessPublic method; parameters and return type are shown in the signature.
redisBehaviormethodredisBehavior(fixtureId: string): import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/memory-server-redis-migration-fixtures").WorkingMemoryMigrationAcceptanceHarnessPublic method; parameters and return type are shown in the signature.
runtimeLifecyclepropertyruntimeLifecycle: MemoryServerRuntimeLifecyclePortPublic property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerMigrationPackageReport

Memory Server Migration Package Report interface with 4 public fields or methods.

Declaration

text
export interface MemoryServerMigrationPackageReport {
    contractRef: MemoryContractSpecRef;
    baseAcceptanceRef: MemoryContractSpecRef;
    passed: boolean;
    suites: readonly MemoryServerMigrationPackageSuiteReport[];
}

Contract members

MemberKindSignatureDescription
baseAcceptanceRefpropertybaseAcceptanceRef: MemoryContractSpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
contractRefpropertycontractRef: 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 MemoryServerMigrationPackageSuiteReport[]Public property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerMigrationPackageSpec

Memory Server Migration Package Spec interface with 4 public fields or methods.

Declaration

text
export interface MemoryServerMigrationPackageSpec {
    contractRef: MemoryContractSpecRef;
    baseAcceptanceRef: MemoryContractSpecRef;
    requiredSuites: readonly [
        'consumer_contract',
        'redis_behavior',
        'permanent_behavior',
        'migration_state_machine',
        'runtime_lifecycle'
    ];
    lifecycleFailurePoints: readonly [
        'provider_create',
        'capability_negotiation',
        'health_check',
        'activity_registration'
    ];
}

Contract members

MemberKindSignatureDescription
baseAcceptanceRefpropertybaseAcceptanceRef: MemoryContractSpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
contractRefpropertycontractRef: MemoryContractSpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
lifecycleFailurePointspropertylifecycleFailurePoints: readonly ["provider_create", "capability_negotiation", "health_check", "activity_registration"]Public property; its type, readonly modifier and optionality are shown in the signature.
requiredSuitespropertyrequiredSuites: readonly ["consumer_contract", "redis_behavior", "permanent_behavior", "migration_state_machine", "runtime_lifecycle"]Public property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerMigrationPackageSuiteReport

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

  • Kind: interface
  • Import: import type { MemoryServerMigrationPackageSuiteReport } from '@codesoul-co/hypha-memory';
  • Source module: memory-server-migration-package

Declaration

text
export interface MemoryServerMigrationPackageSuiteReport {
    id: MemoryServerMigrationPackageSuiteId;
    passed: boolean;
    cases: number;
    findings: readonly MemoryServerMigrationPackageFinding[];
}

Contract members

MemberKindSignatureDescription
casespropertycases: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
findingspropertyfindings: readonly MemoryServerMigrationPackageFinding[]Public property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: MemoryServerMigrationPackageSuiteIdPublic 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.

MemoryServerMigrationStateMachinePort

Memory Server Migration State Machine Port interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { MemoryServerMigrationStateMachinePort } from '@codesoul-co/hypha-memory';
  • Source module: memory-server-migration-package

Declaration

text
export interface MemoryServerMigrationStateMachinePort {
    create(input: {
        migrationId: string;
        revision: string;
        createdAt: string;
    }): MemoryServerCanonicalMigrationState | Promise<MemoryServerCanonicalMigrationState>;
    transition(current: MemoryServerCanonicalMigrationState, input: MemoryServerMigrationTransitionInput): MemoryServerMigrationTransitionResult | Promise<MemoryServerMigrationTransitionResult>;
}

Contract members

MemberKindSignatureDescription
createmethodcreate(input: { migrationId: string; revision: string; createdAt: string; }): MemoryServerCanonicalMigrationState | Promise<MemoryServerCanonicalMigrationState>Public method; parameters and return type are shown in the signature.
transitionmethodtransition(current: MemoryServerCanonicalMigrationState, input: MemoryServerMigrationTransitionInput): MemoryServerMigrationTransitionResult | Promise<MemoryServerMigrationTransitionResult>Public method; parameters and return type are shown in the signature.

MemoryServerRuntimeLifecycleEvidence

Memory Server Runtime Lifecycle Evidence interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { MemoryServerRuntimeLifecycleEvidence } from '@codesoul-co/hypha-memory';
  • Source module: memory-server-migration-package

Declaration

text
export interface MemoryServerRuntimeLifecycleEvidence {
    closeInvocations: number;
    providerCloseCount: number;
    installationCloseCount: number;
    openHandleCount: number;
    failures: readonly MemoryServerLifecycleFailureEvidence[];
}

Contract members

MemberKindSignatureDescription
closeInvocationspropertycloseInvocations: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
failurespropertyfailures: readonly MemoryServerLifecycleFailureEvidence[]Public property; its type, readonly modifier and optionality are shown in the signature.
installationCloseCountpropertyinstallationCloseCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
openHandleCountpropertyopenHandleCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
providerCloseCountpropertyproviderCloseCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

MemoryServerRuntimeLifecyclePort

Memory Server Runtime Lifecycle Port interface with 1 public fields or methods.

Declaration

text
export interface MemoryServerRuntimeLifecyclePort {
    observe(): Promise<MemoryServerRuntimeLifecycleEvidence>;
}

Contract members

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

MemoryServerLifecycleFailurePoint

Public type alias for Memory Server Lifecycle Failure Point; the declaration contains its complete type expression.

Declaration

text
export type MemoryServerLifecycleFailurePoint = (typeof memoryServerMigrationPackageSpec.lifecycleFailurePoints)[number];

MemoryServerMigrationPackageSuiteId

Public type alias for Memory Server Migration Package Suite ID; the declaration contains its complete type expression.

Declaration

text
export type MemoryServerMigrationPackageSuiteId = 'consumer_contract' | 'redis_behavior' | 'permanent_behavior' | 'migration_state_machine' | 'runtime_lifecycle';