Skip to content

@codesoul-co/hypha-memory / lifecycle-schema

Using this module

Use the Lifecycle schema module for declaring and runtime-validating contracts. It exports 12 constants, 2 functions.

Import from the package entrypoint

ts
import {
  memoryExtractionProfileSpecDefinition,
  memoryExtractionProfileSpecExample,
  memoryExtractionProfileSpecJsonSchema,
  memoryExtractionProfileSpecSchema,
  memoryExtractionSourceRefSchema,
  memoryExtractionSourceTypeSchema,
  memoryLifecycleJsonSchemas,
  memoryLifecycleSpecDefinitions,
} from '@codesoul-co/hypha-memory';

// The complete export list is documented below.

Usage patterns

  • The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
  • The 12 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Runtime validation example

ts
import { memoryExtractionProfileSpecSchema } from '@codesoul-co/hypha-memory';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = memoryExtractionProfileSpecSchema.parse(input);

Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.

Public exports

SymbolKindSignatureDescription
memoryExtractionProfileSpecDefinitionconstantconst memoryExtractionProfileSpecDefinition: SpecSchemaDefinition<MemoryExtractionProfileSpec>Runtime validation entrypoint for the Memory Extraction Profile spec, combining its parser, example and JSON Schema.
memoryExtractionProfileSpecExampleconstantconst memoryExtractionProfileSpecExample: MemoryExtractionProfileSpecValid example value for Memory Extraction Profile Spec.
memoryExtractionProfileSpecJsonSchemaconstantconst memoryExtractionProfileSpecJsonSchema: JsonSchemaJSON Schema for Memory Extraction Profile Spec.
memoryExtractionProfileSpecSchemaconstantconst memoryExtractionProfileSpecSchema: z.ZodType<MemoryExtractionProfileSpec, z.ZodTypeDef, MemoryExtractionProfileSpec>Runtime schema for Memory Extraction Profile Spec.
memoryExtractionSourceRefSchemaconstantconst memoryExtractionSourceRefSchema: z.ZodType<MemoryExtractionSourceRef, z.ZodTypeDef, MemoryExtractionSourceRef>Runtime schema for Memory Extraction Source Ref.
memoryExtractionSourceTypeSchemaconstantconst memoryExtractionSourceTypeSchema: z.ZodEnum<["conversation", "truth", "episodic_record", "runtime_event", "tool_observation", "artifact", "structured_record", "custom"]>Runtime schema for Memory Extraction Source Type.
memoryLifecycleJsonSchemasconstantconst memoryLifecycleJsonSchemas: Record<string, JsonSchema>Memory Lifecycle JSON Schemas constant exported by the lifecycle-schema module.
memoryLifecycleSpecDefinitionsconstantconst memoryLifecycleSpecDefinitions: readonly [SpecSchemaDefinition<MemoryExtractionProfileSpec>, SpecSchemaDefinition<MemoryMaintenancePolicySpec>]Memory Lifecycle Spec Definitions constant exported by the lifecycle-schema module.
memoryMaintenancePolicySpecDefinitionconstantconst memoryMaintenancePolicySpecDefinition: SpecSchemaDefinition<MemoryMaintenancePolicySpec>Runtime validation entrypoint for the Memory Maintenance Policy spec, combining its parser, example and JSON Schema.
memoryMaintenancePolicySpecExampleconstantconst memoryMaintenancePolicySpecExample: MemoryMaintenancePolicySpecValid example value for Memory Maintenance Policy Spec.
memoryMaintenancePolicySpecJsonSchemaconstantconst memoryMaintenancePolicySpecJsonSchema: JsonSchemaJSON Schema for Memory Maintenance Policy Spec.
memoryMaintenancePolicySpecSchemaconstantconst memoryMaintenancePolicySpecSchema: z.ZodType<MemoryMaintenancePolicySpec, z.ZodTypeDef, MemoryMaintenancePolicySpec>Runtime schema for Memory Maintenance Policy Spec.
validateMemoryExtractionProfileSpecfunctionvalidateMemoryExtractionProfileSpec(input: unknown): MemoryExtractionProfileSpecValidate Memory Extraction Profile Spec function with 1 public call signature; parameters and return types are listed below.
validateMemoryMaintenancePolicySpecfunctionvalidateMemoryMaintenancePolicySpec(input: unknown): MemoryMaintenancePolicySpecValidate Memory Maintenance Policy Spec function with 1 public call signature; parameters and return types are listed below.

memoryExtractionProfileSpecDefinition

Runtime validation entrypoint for the Memory Extraction Profile spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { memoryExtractionProfileSpecDefinition } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryExtractionProfileSpecDefinition: SpecSchemaDefinition<MemoryExtractionProfileSpec>;

memoryExtractionProfileSpecExample

Valid example value for Memory Extraction Profile Spec.

  • Kind: constant
  • Import: import { memoryExtractionProfileSpecExample } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryExtractionProfileSpecExample: MemoryExtractionProfileSpec;

memoryExtractionProfileSpecJsonSchema

JSON Schema for Memory Extraction Profile Spec.

  • Kind: constant
  • Import: import { memoryExtractionProfileSpecJsonSchema } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryExtractionProfileSpecJsonSchema: JsonSchema;

memoryExtractionProfileSpecSchema

Runtime schema for Memory Extraction Profile Spec.

  • Kind: constant
  • Import: import { memoryExtractionProfileSpecSchema } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryExtractionProfileSpecSchema: z.ZodType<MemoryExtractionProfileSpec, z.ZodTypeDef, MemoryExtractionProfileSpec>;

memoryExtractionSourceRefSchema

Runtime schema for Memory Extraction Source Ref.

  • Kind: constant
  • Import: import { memoryExtractionSourceRefSchema } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryExtractionSourceRefSchema: z.ZodType<MemoryExtractionSourceRef, z.ZodTypeDef, MemoryExtractionSourceRef>;

memoryExtractionSourceTypeSchema

Runtime schema for Memory Extraction Source Type.

  • Kind: constant
  • Import: import { memoryExtractionSourceTypeSchema } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryExtractionSourceTypeSchema: z.ZodEnum<["conversation", "truth", "episodic_record", "runtime_event", "tool_observation", "artifact", "structured_record", "custom"]>;

memoryLifecycleJsonSchemas

Memory Lifecycle JSON Schemas constant exported by the lifecycle-schema module.

  • Kind: constant
  • Import: import { memoryLifecycleJsonSchemas } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryLifecycleJsonSchemas: Record<string, JsonSchema>;

memoryLifecycleSpecDefinitions

Memory Lifecycle Spec Definitions constant exported by the lifecycle-schema module.

  • Kind: constant
  • Import: import { memoryLifecycleSpecDefinitions } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryLifecycleSpecDefinitions: readonly [SpecSchemaDefinition<MemoryExtractionProfileSpec>, SpecSchemaDefinition<MemoryMaintenancePolicySpec>];

memoryMaintenancePolicySpecDefinition

Runtime validation entrypoint for the Memory Maintenance Policy spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { memoryMaintenancePolicySpecDefinition } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryMaintenancePolicySpecDefinition: SpecSchemaDefinition<MemoryMaintenancePolicySpec>;

memoryMaintenancePolicySpecExample

Valid example value for Memory Maintenance Policy Spec.

  • Kind: constant
  • Import: import { memoryMaintenancePolicySpecExample } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryMaintenancePolicySpecExample: MemoryMaintenancePolicySpec;

memoryMaintenancePolicySpecJsonSchema

JSON Schema for Memory Maintenance Policy Spec.

  • Kind: constant
  • Import: import { memoryMaintenancePolicySpecJsonSchema } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryMaintenancePolicySpecJsonSchema: JsonSchema;

memoryMaintenancePolicySpecSchema

Runtime schema for Memory Maintenance Policy Spec.

  • Kind: constant
  • Import: import { memoryMaintenancePolicySpecSchema } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare const memoryMaintenancePolicySpecSchema: z.ZodType<MemoryMaintenancePolicySpec, z.ZodTypeDef, MemoryMaintenancePolicySpec>;

validateMemoryExtractionProfileSpec

Validate Memory Extraction Profile Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateMemoryExtractionProfileSpec } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare function validateMemoryExtractionProfileSpec(input: unknown): MemoryExtractionProfileSpec;

Call signature

text
validateMemoryExtractionProfileSpec(input: unknown): MemoryExtractionProfileSpec

Parameters

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

Returns

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

validateMemoryMaintenancePolicySpec

Validate Memory Maintenance Policy Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateMemoryMaintenancePolicySpec } from '@codesoul-co/hypha-memory';
  • Source module: lifecycle-schema

Declaration

text
export declare function validateMemoryMaintenancePolicySpec(input: unknown): MemoryMaintenancePolicySpec;

Call signature

text
validateMemoryMaintenancePolicySpec(input: unknown): MemoryMaintenancePolicySpec

Parameters

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

Returns

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