@codesoul-co/hypha-memory / memory-server-consumer-migration
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/memory-server-consumer-migration.ts - Exports: 13
Using this module
Use the Memory server consumer migration module for using the public contracts and operations for this capability boundary. It exports 1 constant, 3 functions, 7 interfaces, 2 types.
Import from the package entrypoint
import {
allowedLegacyAdapterResponsibilities,
assertCanonicalConsumerSet,
createMemoryServerCanonicalMigrationState,
transitionMemoryServerCanonicalMigration,
} from '@codesoul-co/hypha-memory';
import type {
CanonicalProfileSwitchObservation,
MemoryServerCanonicalMigrationState,
MemoryServerMigrationReconciliation,
MemoryServerMigrationRetirementEvidence,
MemoryServerMigrationTransitionEvent,
MemoryServerMigrationTransitionInput,
MemoryServerMigrationTransitionResult,
AllowedLegacyAdapterResponsibility,
} from '@codesoul-co/hypha-memory';
// The complete export list is documented below.Usage patterns
- Use the 9 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 3 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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
allowedLegacyAdapterResponsibilities | constant | const allowedLegacyAdapterResponsibilities: readonly ["delegate", "scope_mapping", "error_mapping"] | Allowed Legacy Adapter Responsibilities constant exported by the memory-server-consumer-migration module. |
assertCanonicalConsumerSet | function | assertCanonicalConsumerSet(bindings: Partial<Record<MemoryServerConsumer, string>>, expectedServiceInstanceId: string, consumers: readonly MemoryServerConsumer[]): void | Assert Canonical Consumer Set function with 1 public call signature; parameters and return types are listed below. |
createMemoryServerCanonicalMigrationState | function | createMemoryServerCanonicalMigrationState(input: { migrationId: string; revision: string; createdAt: string; }): MemoryServerCanonicalMigrationState | Create Memory Server Canonical Migration State function with 1 public call signature; parameters and return types are listed below. |
transitionMemoryServerCanonicalMigration | function | transitionMemoryServerCanonicalMigration(current: MemoryServerCanonicalMigrationState, input: MemoryServerMigrationTransitionInput): MemoryServerMigrationTransitionResult | Transition Memory Server Canonical Migration function with 1 public call signature; parameters and return types are listed below. |
CanonicalProfileSwitchObservation | interface | interface CanonicalProfileSwitchObservation | Canonical Profile Switch Observation interface with 4 public fields or methods. |
MemoryServerCanonicalMigrationState | interface | interface MemoryServerCanonicalMigrationState | Memory Server Canonical Migration State interface with 8 public fields or methods. |
MemoryServerMigrationReconciliation | interface | interface MemoryServerMigrationReconciliation | Memory Server Migration Reconciliation interface with 4 public fields or methods. |
MemoryServerMigrationRetirementEvidence | interface | interface MemoryServerMigrationRetirementEvidence | Memory Server Migration Retirement Evidence interface with 5 public fields or methods. |
MemoryServerMigrationTransitionEvent | interface | interface MemoryServerMigrationTransitionEvent | Memory Server Migration Transition Event interface with 10 public fields or methods. |
MemoryServerMigrationTransitionInput | interface | interface MemoryServerMigrationTransitionInput | Memory Server Migration Transition Input interface with 7 public fields or methods. |
MemoryServerMigrationTransitionResult | interface | interface MemoryServerMigrationTransitionResult | Memory Server Migration Transition Result interface with 2 public fields or methods. |
AllowedLegacyAdapterResponsibility | type | type AllowedLegacyAdapterResponsibility = (typeof allowedLegacyAdapterResponsibilities)[number] | Public type alias for Allowed Legacy Adapter Responsibility; the declaration contains its complete type expression. |
MemoryServerMigrationPhase | type | type MemoryServerMigrationPhase = 'planned' | 'shadow_read' | 'bounded_dual_write' | 'verify' | 'cutover' | 'retire' | 'rollback' | Public type alias for Memory Server Migration Phase; the declaration contains its complete type expression. |
allowedLegacyAdapterResponsibilities
Allowed Legacy Adapter Responsibilities constant exported by the memory-server-consumer-migration module.
- Kind: constant
- Import:
import { allowedLegacyAdapterResponsibilities } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export declare const allowedLegacyAdapterResponsibilities: readonly ["delegate", "scope_mapping", "error_mapping"];assertCanonicalConsumerSet
Assert Canonical Consumer Set function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertCanonicalConsumerSet } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export declare function assertCanonicalConsumerSet(bindings: Partial<Record<MemoryServerConsumer, string>>, expectedServiceInstanceId: string, consumers: readonly MemoryServerConsumer[]): void;Call signature
assertCanonicalConsumerSet(bindings: Partial<Record<MemoryServerConsumer, string>>, expectedServiceInstanceId: string, consumers: readonly MemoryServerConsumer[]): voidParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
bindings | Partial<Record<MemoryServerConsumer, string>> | Yes | Required parameter; accepted values are defined by the type column. |
expectedServiceInstanceId | string | Yes | Required parameter; accepted values are defined by the type column. |
consumers | readonly MemoryServerConsumer[] | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
void - Description: Returns no value.
createMemoryServerCanonicalMigrationState
Create Memory Server Canonical Migration State function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { createMemoryServerCanonicalMigrationState } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export declare function createMemoryServerCanonicalMigrationState(input: {
migrationId: string;
revision: string;
createdAt: string;
}): MemoryServerCanonicalMigrationState;Call signature
createMemoryServerCanonicalMigrationState(input: { migrationId: string; revision: string; createdAt: string; }): MemoryServerCanonicalMigrationStateParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | { migrationId: string; revision: string; createdAt: string; } | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MemoryServerCanonicalMigrationState - Description: The return contract is defined by the type shown above.
transitionMemoryServerCanonicalMigration
Transition Memory Server Canonical Migration function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { transitionMemoryServerCanonicalMigration } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export declare function transitionMemoryServerCanonicalMigration(current: MemoryServerCanonicalMigrationState, input: MemoryServerMigrationTransitionInput): MemoryServerMigrationTransitionResult;Call signature
transitionMemoryServerCanonicalMigration(current: MemoryServerCanonicalMigrationState, input: MemoryServerMigrationTransitionInput): MemoryServerMigrationTransitionResultParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
current | MemoryServerCanonicalMigrationState | Yes | Required parameter; accepted values are defined by the type column. |
input | MemoryServerMigrationTransitionInput | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MemoryServerMigrationTransitionResult - Description: The return contract is defined by the type shown above.
CanonicalProfileSwitchObservation
Canonical Profile Switch Observation interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { CanonicalProfileSwitchObservation } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export interface CanonicalProfileSwitchObservation {
profileId: string;
expectedProviderId: string;
observedReadProviderId: string;
observedWriteProviderId: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
expectedProviderId | property | expectedProviderId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
observedReadProviderId | property | observedReadProviderId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
observedWriteProviderId | property | observedWriteProviderId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileId | property | profileId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerCanonicalMigrationState
Memory Server Canonical Migration State interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerCanonicalMigrationState } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export interface MemoryServerCanonicalMigrationState {
migrationId: string;
revision: string;
phase: MemoryServerMigrationPhase;
activePath: 'legacy' | 'dual' | 'canonical';
updatedAt: string;
dualWrite?: {
deadlineAt: string;
idempotencyKey: string;
checkpointRef: string;
};
reconciliation: MemoryServerMigrationReconciliation;
retirement?: MemoryServerMigrationRetirementEvidence;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activePath | property | activePath: "legacy" | "dual" | "canonical" | Public property; its type, readonly modifier and optionality are shown in the signature. |
dualWrite | property | dualWrite?: { deadlineAt: string; idempotencyKey: string; checkpointRef: string; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
migrationId | property | migrationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
phase | property | phase: MemoryServerMigrationPhase | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconciliation | property | reconciliation: MemoryServerMigrationReconciliation | Public property; its type, readonly modifier and optionality are shown in the signature. |
retirement | property | retirement?: MemoryServerMigrationRetirementEvidence | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: 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. |
MemoryServerMigrationReconciliation
Memory Server Migration Reconciliation interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationReconciliation } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export interface MemoryServerMigrationReconciliation {
status: 'not_run' | 'passed' | 'failed';
comparedRecords: number;
mismatchCount: number;
shadowResult: 'not_run' | 'matched' | 'mismatched';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
comparedRecords | property | comparedRecords: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
mismatchCount | property | mismatchCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
shadowResult | property | shadowResult: "not_run" | "matched" | "mismatched" | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "failed" | "not_run" | "passed" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationRetirementEvidence
Memory Server Migration Retirement Evidence interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationRetirementEvidence } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export interface MemoryServerMigrationRetirementEvidence {
legacyReadTraffic: number;
legacyWriteTraffic: number;
legacyImports: number;
legacyRegistrations: number;
rollbackWindowEndsAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
legacyImports | property | legacyImports: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
legacyReadTraffic | property | legacyReadTraffic: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
legacyRegistrations | property | legacyRegistrations: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
legacyWriteTraffic | property | legacyWriteTraffic: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
rollbackWindowEndsAt | property | rollbackWindowEndsAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationTransitionEvent
Memory Server Migration Transition Event interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationTransitionEvent } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export interface MemoryServerMigrationTransitionEvent {
type: 'memory.server_migration.transitioned';
migrationId: string;
migrationRevision: string;
fromPhase: MemoryServerMigrationPhase;
toPhase: MemoryServerMigrationPhase;
activePath: 'legacy' | 'dual' | 'canonical';
shadowResult: MemoryServerMigrationReconciliation['shadowResult'];
checkpointRef?: string;
reason: string;
occurredAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activePath | property | activePath: "legacy" | "dual" | "canonical" | Public property; its type, readonly modifier and optionality are shown in the signature. |
checkpointRef | property | checkpointRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fromPhase | property | fromPhase: MemoryServerMigrationPhase | Public property; its type, readonly modifier and optionality are shown in the signature. |
migrationId | property | migrationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
migrationRevision | property | migrationRevision: 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. |
shadowResult | property | shadowResult: "not_run" | "matched" | "mismatched" | Public property; its type, readonly modifier and optionality are shown in the signature. |
toPhase | property | toPhase: MemoryServerMigrationPhase | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "memory.server_migration.transitioned" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationTransitionInput
Memory Server Migration Transition Input interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationTransitionInput } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export interface MemoryServerMigrationTransitionInput {
targetPhase: Exclude<MemoryServerMigrationPhase, 'planned'>;
expectedRevision: string;
occurredAt: string;
reason: string;
dualWrite?: {
deadlineAt: string;
idempotencyKey: string;
checkpointRef: string;
};
reconciliation?: MemoryServerMigrationReconciliation;
retirement?: MemoryServerMigrationRetirementEvidence;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
dualWrite | property | dualWrite?: { deadlineAt: string; idempotencyKey: string; checkpointRef: string; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedRevision | property | expectedRevision: 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. |
reconciliation | property | reconciliation?: MemoryServerMigrationReconciliation | Public property; its type, readonly modifier and optionality are shown in the signature. |
retirement | property | retirement?: MemoryServerMigrationRetirementEvidence | Public property; its type, readonly modifier and optionality are shown in the signature. |
targetPhase | property | targetPhase: "verify" | "shadow_read" | "bounded_dual_write" | "cutover" | "retire" | "rollback" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationTransitionResult
Memory Server Migration Transition Result interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationTransitionResult } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export interface MemoryServerMigrationTransitionResult {
state: MemoryServerCanonicalMigrationState;
event: MemoryServerMigrationTransitionEvent;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
event | property | event: MemoryServerMigrationTransitionEvent | Public property; its type, readonly modifier and optionality are shown in the signature. |
state | property | state: MemoryServerCanonicalMigrationState | Public property; its type, readonly modifier and optionality are shown in the signature. |
AllowedLegacyAdapterResponsibility
Public type alias for Allowed Legacy Adapter Responsibility; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { AllowedLegacyAdapterResponsibility } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export type AllowedLegacyAdapterResponsibility = (typeof allowedLegacyAdapterResponsibilities)[number];MemoryServerMigrationPhase
Public type alias for Memory Server Migration Phase; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MemoryServerMigrationPhase } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-consumer-migration
Declaration
export type MemoryServerMigrationPhase = 'planned' | 'shadow_read' | 'bounded_dual_write' | 'verify' | 'cutover' | 'retire' | 'rollback';