@codesoul-co/hypha-memory / memory-runtime-factory
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/memory-runtime-factory.ts - Exports: 14
Using this module
Use the Memory runtime factory module for executing runtime behavior at this boundary. It exports 2 classes, 2 constants, 1 function, 8 interfaces, 1 type.
Import from the package entrypoint
import {
MemoryManagementProviderRegistry,
MemoryRuntimeFactory,
memoryRuntimeConfigSchema,
memoryRuntimeProfileSchema,
validateMemoryRuntimeConfig,
} from '@codesoul-co/hypha-memory';
import type {
MemoryManagementProviderFactory,
MemoryManagementProviderFactoryContext,
MemoryManagementProviderInstallation,
MemoryRuntime,
MemoryRuntimeCompositionReceipt,
MemoryRuntimeConfig,
MemoryRuntimeFactoryOptions,
MemoryRuntimeProfile,
} 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 2 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
- The module exposes 1 function as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 2 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 |
|---|---|---|---|
MemoryManagementProviderRegistry | class | new MemoryManagementProviderRegistry(): MemoryManagementProviderRegistry | Memory Management Provider Registry class with 3 public constructor or member entries; its exact declarations are listed below. |
MemoryRuntimeFactory | class | new MemoryRuntimeFactory(options: MemoryRuntimeFactoryOptions): MemoryRuntimeFactory | Strict composition root for all Memory consumers. |
memoryRuntimeConfigSchema | constant | const memoryRuntimeConfigSchema: ZodType<MemoryRuntimeConfig, ZodTypeDef, MemoryRuntimeConfig> | Runtime schema for Memory Runtime Config. |
memoryRuntimeProfileSchema | constant | const memoryRuntimeProfileSchema: ZodType<MemoryRuntimeProfile, ZodTypeDef, MemoryRuntimeProfile> | Runtime schema for Memory Runtime Profile. |
validateMemoryRuntimeConfig | function | validateMemoryRuntimeConfig(input: unknown): MemoryRuntimeConfig | Validate Memory Runtime Config function with 1 public call signature; parameters and return types are listed below. |
MemoryManagementProviderFactory | interface | interface MemoryManagementProviderFactory | Memory Management Provider Factory interface with 3 public fields or methods. |
MemoryManagementProviderFactoryContext | interface | interface MemoryManagementProviderFactoryContext | Memory Management Provider Factory Context interface with 3 public fields or methods. |
MemoryManagementProviderInstallation | interface | interface MemoryManagementProviderInstallation | Memory Management Provider Installation interface with 4 public fields or methods. |
MemoryRuntime | interface | interface MemoryRuntime | Memory Runtime interface with 10 public fields or methods. |
MemoryRuntimeCompositionReceipt | interface | interface MemoryRuntimeCompositionReceipt | Memory Runtime Composition Receipt interface with 10 public fields or methods. |
MemoryRuntimeConfig | interface | interface MemoryRuntimeConfig | Memory Runtime Config interface with 2 public fields or methods. |
MemoryRuntimeFactoryOptions | interface | interface MemoryRuntimeFactoryOptions | Memory Runtime Factory Options interface with 12 public fields or methods. |
MemoryRuntimeProfile | interface | interface MemoryRuntimeProfile | Memory Runtime Profile interface with 2 public fields or methods. |
MemoryRuntimeSearchCacheOptions | type | type MemoryRuntimeSearchCacheOptions = Omit<CachedMemoryManagementProviderOptions, 'provider' | 'providerRevision' | 'requiredScopeFields' | 'cacheAuthorization' | 'requireCacheAuthorization'> | Public type alias for Memory Runtime Search Cache Options; the declaration contains its complete type expression. |
MemoryManagementProviderRegistry
Memory Management Provider Registry class with 3 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MemoryManagementProviderRegistry } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export declare class MemoryManagementProviderRegistry {
register(factory: MemoryManagementProviderFactory): this;
resolve(spec: MemoryManagementProviderSpec): MemoryManagementProviderFactory;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (): MemoryManagementProviderRegistry | Creates an instance of this class. |
register | method | register(factory: MemoryManagementProviderFactory): MemoryManagementProviderRegistry | Public method; parameters and return type are shown in the signature. |
resolve | method | resolve(spec: MemoryManagementProviderSpec): MemoryManagementProviderFactory | Public method; parameters and return type are shown in the signature. |
MemoryRuntimeFactory
Strict composition root for all Memory consumers.
- Kind: class
- Import:
import { MemoryRuntimeFactory } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export declare class MemoryRuntimeFactory {
constructor(options: MemoryRuntimeFactoryOptions);
create(input: unknown, references?: ReadonlyMap<string, unknown>): Promise<MemoryRuntime>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: MemoryRuntimeFactoryOptions): MemoryRuntimeFactory | Creates an instance of this class. |
create | method | create(input: unknown, references?: ReadonlyMap<string, unknown>): Promise<MemoryRuntime> | Public method; parameters and return type are shown in the signature. |
memoryRuntimeConfigSchema
Runtime schema for Memory Runtime Config.
- Kind: constant
- Import:
import { memoryRuntimeConfigSchema } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export declare const memoryRuntimeConfigSchema: ZodType<MemoryRuntimeConfig, ZodTypeDef, MemoryRuntimeConfig>;memoryRuntimeProfileSchema
Runtime schema for Memory Runtime Profile.
- Kind: constant
- Import:
import { memoryRuntimeProfileSchema } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export declare const memoryRuntimeProfileSchema: ZodType<MemoryRuntimeProfile, ZodTypeDef, MemoryRuntimeProfile>;validateMemoryRuntimeConfig
Validate Memory Runtime Config function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateMemoryRuntimeConfig } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export declare function validateMemoryRuntimeConfig(input: unknown): MemoryRuntimeConfig;Call signature
validateMemoryRuntimeConfig(input: unknown): MemoryRuntimeConfigParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MemoryRuntimeConfig - Description: The return contract is defined by the type shown above.
MemoryManagementProviderFactory
Memory Management Provider Factory interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryManagementProviderFactory } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryManagementProviderFactory {
readonly id: string;
supports(spec: MemoryManagementProviderSpec): boolean;
create(context: MemoryManagementProviderFactoryContext): Promise<MemoryManagementProvider | MemoryManagementProviderInstallation>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
create | method | create(context: MemoryManagementProviderFactoryContext): Promise<MemoryManagementProvider | MemoryManagementProviderInstallation> | Public method; parameters and return type are shown in the signature. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
supports | method | supports(spec: MemoryManagementProviderSpec): boolean | Public method; parameters and return type are shown in the signature. |
MemoryManagementProviderFactoryContext
Memory Management Provider Factory Context interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryManagementProviderFactoryContext } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryManagementProviderFactoryContext {
profile: MemoryProfileSpec;
spec: MemoryManagementProviderSpec;
references?: ReadonlyMap<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
profile | property | profile: MemoryProfileSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
references | property | references?: ReadonlyMap<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
spec | property | spec: MemoryManagementProviderSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryManagementProviderInstallation
Memory Management Provider Installation interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryManagementProviderInstallation } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryManagementProviderInstallation {
provider: MemoryManagementProvider;
reconciliationStore?: MemoryLifecycleTaskStore;
resources?: unknown;
close?(): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
close | method | close?(): Promise<void> | Public method; parameters and return type are shown in the signature. |
provider | property | provider: MemoryManagementProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconciliationStore | property | reconciliationStore?: MemoryLifecycleTaskStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
resources | property | resources?: unknown | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRuntime
Memory Runtime interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRuntime } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryRuntime {
service: MemoryApplicationService;
provider: MemoryManagementProvider;
profile: MemoryProfileSpec;
providerSpec: MemoryManagementProviderSpec;
profileHash: string;
capabilities: MemoryManagementCapabilities;
compositionReceipt: MemoryRuntimeCompositionReceipt;
resources?: unknown;
close(): Promise<void>;
telemetry?: MemoryProviderTelemetry;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
capabilities | property | capabilities: MemoryManagementCapabilities | Public property; its type, readonly modifier and optionality are shown in the signature. |
close | method | close(): Promise<void> | Public method; parameters and return type are shown in the signature. |
compositionReceipt | property | compositionReceipt: MemoryRuntimeCompositionReceipt | Public property; its type, readonly modifier and optionality are shown in the signature. |
profile | property | profile: MemoryProfileSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileHash | property | profileHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
provider | property | provider: MemoryManagementProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerSpec | property | providerSpec: MemoryManagementProviderSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
resources | property | resources?: unknown | Public property; its type, readonly modifier and optionality are shown in the signature. |
service | property | service: MemoryApplicationService | Public property; its type, readonly modifier and optionality are shown in the signature. |
telemetry | property | telemetry?: MemoryProviderTelemetry | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRuntimeCompositionReceipt
Memory Runtime Composition Receipt interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRuntimeCompositionReceipt } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryRuntimeCompositionReceipt {
runtimeId: string;
serviceInstanceId: string;
serviceContract: '@codesoul-co/hypha-memory.MemoryApplicationService';
activeProfileId: string;
providerId: string;
providerSpecId: string;
configHash: string;
profileHash: string;
resolvedDependencyRefs: string[];
createdAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activeProfileId | property | activeProfileId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
configHash | property | configHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileHash | property | profileHash: string | 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. |
providerSpecId | property | providerSpecId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resolvedDependencyRefs | property | resolvedDependencyRefs: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
runtimeId | property | runtimeId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
serviceContract | property | serviceContract: "@codesoul-co/hypha-memory.MemoryApplicationService" | Public property; its type, readonly modifier and optionality are shown in the signature. |
serviceInstanceId | property | serviceInstanceId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRuntimeConfig
Memory Runtime Config interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRuntimeConfig } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryRuntimeConfig {
activeProfile: string;
profiles: Record<string, MemoryRuntimeProfile>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activeProfile | property | activeProfile: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profiles | property | profiles: Record<string, MemoryRuntimeProfile> | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRuntimeFactoryOptions
Memory Runtime Factory Options interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRuntimeFactoryOptions } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryRuntimeFactoryOptions {
registry: MemoryManagementProviderRegistry;
activities: DefaultMemoryActivityPortOptions;
eventContext: (request: MemoryRuntimeRequestContext) => MemoryEventContext;
contextBuilder?: MemoryContextBuilder;
contextGateway?: ContextInjectionGateway;
reconciliationStore?: MemoryLifecycleTaskStore;
telemetry?: MemoryProviderTelemetry;
operationalMetrics?: MemoryOperationalMetrics;
providerCostEstimator?: MemoryProviderCostEstimator;
searchCache?: MemoryRuntimeSearchCacheOptions;
projectionInvalidation?: MemoryProjectionInvalidationPort;
now?: () => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activities | property | activities: DefaultMemoryActivityPortOptions | Public property; its type, readonly modifier and optionality are shown in the signature. |
contextBuilder | property | contextBuilder?: MemoryContextBuilder | Public property; its type, readonly modifier and optionality are shown in the signature. |
contextGateway | property | contextGateway?: ContextInjectionGateway | Public property; its type, readonly modifier and optionality are shown in the signature. |
eventContext | method | eventContext(request: MemoryRuntimeRequestContext): MemoryEventContext | Public method; parameters and return type are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
operationalMetrics | property | operationalMetrics?: MemoryOperationalMetrics | Public property; its type, readonly modifier and optionality are shown in the signature. |
projectionInvalidation | property | projectionInvalidation?: MemoryProjectionInvalidationPort | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerCostEstimator | method | providerCostEstimator?(operation: import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/provider-observability").MemoryProviderOperation, request: unknown): import("/Users/erwin/Downloads/codespace/Hypha/packages/memory/dist/provider-observability").MemoryProviderOperationEstimate | Public method; parameters and return type are shown in the signature. |
reconciliationStore | property | reconciliationStore?: MemoryLifecycleTaskStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
registry | property | registry: MemoryManagementProviderRegistry | Public property; its type, readonly modifier and optionality are shown in the signature. |
searchCache | property | searchCache?: MemoryRuntimeSearchCacheOptions | Public property; its type, readonly modifier and optionality are shown in the signature. |
telemetry | property | telemetry?: MemoryProviderTelemetry | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRuntimeProfile
Memory Runtime Profile interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRuntimeProfile } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export interface MemoryRuntimeProfile {
profile: MemoryProfileSpec;
management: MemoryManagementProviderSpec;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
management | property | management: MemoryManagementProviderSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
profile | property | profile: MemoryProfileSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRuntimeSearchCacheOptions
Public type alias for Memory Runtime Search Cache Options; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MemoryRuntimeSearchCacheOptions } from '@codesoul-co/hypha-memory'; - Source module:
memory-runtime-factory
Declaration
export type MemoryRuntimeSearchCacheOptions = Omit<CachedMemoryManagementProviderOptions, 'provider' | 'providerRevision' | 'requiredScopeFields' | 'cacheAuthorization' | 'requireCacheAuthorization'>;