@codesoul-co/hypha-memory / index
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/index.ts - Exports: 40
Using this module
Aggregates the public entrypoint exports for @codesoul-co/hypha-memory; applications import these symbols from the package entrypoint instead of internal file paths.
Import from the package entrypoint
import {
MemoryManager,
memoryProviderProfileSchema,
memoryRetrievalPolicySchema,
memorySpecDefinition,
memorySpecDefinitions,
memorySpecExample,
memorySpecJsonSchema,
memorySpecJsonSchemas,
} from '@codesoul-co/hypha-memory';
import type {
ArtifactMeta,
ArtifactRef,
ArtifactStoreProvider,
EmbeddingProvider,
MemoryAuditOptions,
MemoryAuditReport,
MemoryManagerOptions,
MemoryManagerRecoveryOptions,
} from '@codesoul-co/hypha-memory';
// The complete export list is documented below.Usage patterns
- Use the 29 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 1 class 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 9 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Runtime validation example
import { memoryProviderProfileSchema } from '@codesoul-co/hypha-memory';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = memoryProviderProfileSchema.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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
MemoryManager | class | new MemoryManager(provider: MemoryProvider | MemoryManagementProvider, options?: MemoryManagerOptions): MemoryManager | Memory Manager class with 16 public constructor or member entries; its exact declarations are listed below. |
memoryProviderProfileSchema | constant | const memoryProviderProfileSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<["structured", "vector", "artifact", "hybrid"]>; providerRef: z.ZodString; configSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; }, "strip", z.ZodTypeAny, { id: string; type: "artifact" | "structured" | "vector" | "hybrid"; providerRef: string; configSchema?: JsonSchema | undefined; }, { id: string; type: "art... | Runtime schema for Memory Provider Profile. |
memoryRetrievalPolicySchema | constant | const memoryRetrievalPolicySchema: z.ZodObject<{ defaultTopK: z.ZodOptional<z.ZodNumber>; vectorWeight: z.ZodOptional<z.ZodNumber>; textWeight: z.ZodOptional<z.ZodNumber>; requireScope: z.ZodOptional<z.ZodBoolean>; allowedTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["working", "episodic", "semantic", "procedural", "artifact", "governance"]>, "many">>; }, "strip", z.ZodTypeAny, { defaultTopK?: number | undefined; vec... | Runtime schema for Memory Retrieval Policy. |
memorySpecDefinition | constant | const memorySpecDefinition: SpecSchemaDefinition<MemorySpec> | Runtime validation entrypoint for the Memory spec, combining its parser, example and JSON Schema. |
memorySpecDefinitions | constant | const memorySpecDefinitions: readonly [SpecSchemaDefinition<MemorySpec>] | Memory Spec Definitions constant exported by the index module. |
memorySpecExample | constant | const memorySpecExample: MemorySpec | Valid example value for Memory Spec. |
memorySpecJsonSchema | constant | const memorySpecJsonSchema: JsonSchema | JSON Schema for Memory Spec. |
memorySpecJsonSchemas | constant | const memorySpecJsonSchemas: Record<string, JsonSchema> | Memory Spec JSON Schemas constant exported by the index module. |
memorySpecSchema | constant | const memorySpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { providers: z.ZodArray<z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<["structured", "v... | Runtime schema for Memory Spec. |
memoryTypeSchema | constant | const memoryTypeSchema: z.ZodEnum<["working", "episodic", "semantic", "procedural", "artifact", "governance"]> | Runtime schema for Memory Type. |
validateMemorySpec | function | validateMemorySpec(input: unknown): MemorySpec | Validate Memory Spec function with 1 public call signature; parameters and return types are listed below. |
ArtifactMeta | interface | interface ArtifactMeta | Artifact Meta interface with 4 public fields or methods. |
ArtifactRef | interface | interface ArtifactRef | Artifact Ref interface with 3 public fields or methods. |
ArtifactStoreProvider | interface | interface ArtifactStoreProvider | Artifact Store Provider interface with 3 public fields or methods. |
EmbeddingProvider | interface | interface EmbeddingProvider | Embedding Provider interface with 1 public fields or methods. |
MemoryAuditOptions | interface | interface MemoryAuditOptions | Memory Audit Options interface with 2 public fields or methods. |
MemoryAuditReport | interface | interface MemoryAuditReport | Memory Audit Report interface with 3 public fields or methods. |
MemoryManagerOptions | interface | interface MemoryManagerOptions | Memory Manager Options interface with 4 public fields or methods. |
MemoryManagerRecoveryOptions | interface | interface MemoryManagerRecoveryOptions | Memory Manager Recovery Options interface with 5 public fields or methods. |
MemoryProvider | interface | interface MemoryProvider | Memory Provider interface with 7 public fields or methods. |
MemoryProviderProfile | interface | interface MemoryProviderProfile | Memory Provider Profile interface with 4 public fields or methods. |
MemoryReadQuery | interface | interface MemoryReadQuery | Memory Read Query interface with 3 public fields or methods. |
MemoryRecord | interface | interface MemoryRecord | Memory Record interface with 10 public fields or methods. |
MemoryRetrievalPolicy | interface | interface MemoryRetrievalPolicy | Memory Retrieval Policy interface with 5 public fields or methods. |
MemoryScope | interface | interface MemoryScope | Memory Scope interface with 4 public fields or methods. |
MemorySearchQuery | interface | interface MemorySearchQuery | Memory Search Query interface with 4 public fields or methods. |
MemorySearchResult | interface | interface MemorySearchResult | Memory Search Result interface with 3 public fields or methods. |
MemorySpec | interface | interface MemorySpec extends VersionedSpec, SpecMetadata | Memory Spec interface with 23 public fields or methods. |
MemorySummary | interface | interface MemorySummary | Memory Summary interface with 3 public fields or methods. |
MemorySummaryOptions | interface | interface MemorySummaryOptions | Memory Summary Options interface with 2 public fields or methods. |
MemoryTraceContext | interface | interface MemoryTraceContext | Memory Trace Context interface with 7 public fields or methods. |
MemoryWritePolicy | interface | interface MemoryWritePolicy | Memory Write Policy interface with 4 public fields or methods. |
MemoryWriteResult | interface | interface MemoryWriteResult | Memory Write Result interface with 3 public fields or methods. |
StructuredQuery | interface | interface StructuredQuery | Structured Query interface with 3 public fields or methods. |
StructuredStoreProvider | interface | interface StructuredStoreProvider | Structured Store Provider interface with 7 public fields or methods. |
VectorIndexProvider | interface | interface VectorIndexProvider | Vector Index Provider interface with 3 public fields or methods. |
VectorQuery | interface | interface VectorQuery | Vector Query interface with 3 public fields or methods. |
VectorRecord | interface | interface VectorRecord | Vector Record interface with 3 public fields or methods. |
VectorSearchResult | interface | interface VectorSearchResult | Vector Search Result interface with 3 public fields or methods. |
MemoryType | type | type MemoryType = 'working' | 'episodic' | 'semantic' | 'procedural' | 'artifact' | 'governance' | Public type alias for Memory Type; the declaration contains its complete type expression. |
MemoryManager
Memory Manager class with 16 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MemoryManager } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare class MemoryManager {
constructor(provider: MemoryProvider | MemoryManagementProvider, options?: MemoryManagerOptions);
capabilities(): Promise<MemoryManagementCapabilities>;
add(request: MemoryAddRequest): Promise<ManagedMemoryWriteResult>;
read(scope: MemoryScope, query: MemoryReadQuery): Promise<MemoryRecord[]>;
search(scope: MemoryScope, query: MemorySearchQuery): Promise<MemorySearchResult[]>;
search(request: ManagedMemorySearchRequest): Promise<ManagedMemorySearchResult[]>;
write(scope: MemoryScope, record: MemoryRecord, policy: MemoryWritePolicy): Promise<MemoryWriteResult>;
update(scope: MemoryScope, recordId: string, patch: Partial<MemoryRecord>): Promise<void>;
update(request: ManagedMemoryUpdateRequest): Promise<ManagedMemoryWriteResult>;
get(request: MemoryGetRequest): Promise<ManagedMemoryRecord | null>;
list(request: MemoryListRequest): Promise<MemoryListResult>;
delete(request: ManagedMemoryDeleteRequest): Promise<ManagedMemoryDeleteResult>;
history(request: MemoryHistoryRequest): Promise<MemoryVersion[]>;
health(): Promise<ProviderHealth>;
close(): Promise<void>;
invalidate(scope: MemoryScope, recordId: string, reason: string): Promise<void>;
summarize(scope: MemoryScope, options?: MemorySummaryOptions): Promise<MemorySummary>;
audit(scope: MemoryScope, options?: MemoryAuditOptions): Promise<MemoryAuditReport>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
add | method | add(request: MemoryAddRequest): Promise<ManagedMemoryWriteResult> | Public method; parameters and return type are shown in the signature. |
audit | method | audit(scope: MemoryScope, options?: MemoryAuditOptions): Promise<MemoryAuditReport> | Public method; parameters and return type are shown in the signature. |
capabilities | method | capabilities(): Promise<MemoryManagementCapabilities> | Public method; parameters and return type are shown in the signature. |
close | method | close(): Promise<void> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (provider: MemoryProvider | MemoryManagementProvider, options?: MemoryManagerOptions): MemoryManager | Creates an instance of this class. |
delete | method | delete(request: ManagedMemoryDeleteRequest): Promise<ManagedMemoryDeleteResult> | Public method; parameters and return type are shown in the signature. |
get | method | get(request: MemoryGetRequest): Promise<ManagedMemoryRecord | null> | Public method; parameters and return type are shown in the signature. |
health | method | health(): Promise<ProviderHealth> | Public method; parameters and return type are shown in the signature. |
history | method | history(request: MemoryHistoryRequest): Promise<MemoryVersion[]> | Public method; parameters and return type are shown in the signature. |
invalidate | method | invalidate(scope: MemoryScope, recordId: string, reason: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
list | method | list(request: MemoryListRequest): Promise<MemoryListResult> | Public method; parameters and return type are shown in the signature. |
read | method | read(scope: MemoryScope, query: MemoryReadQuery): Promise<MemoryRecord[]> | Public method; parameters and return type are shown in the signature. |
search | method | search(scope: MemoryScope, query: MemorySearchQuery): Promise<MemorySearchResult[]> | search(request: ManagedMemorySearchRequest): Promise<ManagedMemorySearchResult[]> | Public method; parameters and return type are shown in the signature. |
summarize | method | summarize(scope: MemoryScope, options?: MemorySummaryOptions): Promise<MemorySummary> | Public method; parameters and return type are shown in the signature. |
update | method | update(scope: MemoryScope, recordId: string, patch: Partial<MemoryRecord>): Promise<void> | update(request: ManagedMemoryUpdateRequest): Promise<ManagedMemoryWriteResult> | Public method; parameters and return type are shown in the signature. |
write | method | write(scope: MemoryScope, record: MemoryRecord, policy: MemoryWritePolicy): Promise<MemoryWriteResult> | Public method; parameters and return type are shown in the signature. |
memoryProviderProfileSchema
Runtime schema for Memory Provider Profile.
- Kind: constant
- Import:
import { memoryProviderProfileSchema } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memoryProviderProfileSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<["structured", "vector", "artifact", "hybrid"]>; providerRef: z.ZodString; configSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; }, "strip", z.ZodTypeAny, { id: string; type: "artifact" | "structured" | "vector" | "hybrid"; providerRef: string; configSchema?: JsonSchema | undefined; }, { id: string; type: "artifact" | "structured" | "vector" | "hybrid"; providerRef: string; configSchema?: JsonSchema | undefined; }>;memoryRetrievalPolicySchema
Runtime schema for Memory Retrieval Policy.
- Kind: constant
- Import:
import { memoryRetrievalPolicySchema } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memoryRetrievalPolicySchema: z.ZodObject<{ defaultTopK: z.ZodOptional<z.ZodNumber>; vectorWeight: z.ZodOptional<z.ZodNumber>; textWeight: z.ZodOptional<z.ZodNumber>; requireScope: z.ZodOptional<z.ZodBoolean>; allowedTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["working", "episodic", "semantic", "procedural", "artifact", "governance"]>, "many">>; }, "strip", z.ZodTypeAny, { defaultTopK?: number | undefined; vectorWeight?: number | undefined; textWeight?: number | undefined; requireScope?: boolean | undefined; allowedTypes?: ("working" | "episodic" | "semantic" | "procedural" | "artifact" | "governance")[] | undefined; }, { defaultTopK?: number | undefined; vectorWeight?: number | undefined; textWeight?: number | undefined; requireScope?: boolean | undefined; allowedTypes?: ("working" | "episodic" | "semantic" | "procedural" | "artifact" | "governance")[] | undefined; }>;memorySpecDefinition
Runtime validation entrypoint for the Memory spec, combining its parser, example and JSON Schema.
- Kind: constant
- Import:
import { memorySpecDefinition } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memorySpecDefinition: SpecSchemaDefinition<MemorySpec>;memorySpecDefinitions
Memory Spec Definitions constant exported by the index module.
- Kind: constant
- Import:
import { memorySpecDefinitions } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memorySpecDefinitions: readonly [SpecSchemaDefinition<MemorySpec>];memorySpecExample
Valid example value for Memory Spec.
- Kind: constant
- Import:
import { memorySpecExample } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memorySpecExample: MemorySpec;memorySpecJsonSchema
JSON Schema for Memory Spec.
- Kind: constant
- Import:
import { memorySpecJsonSchema } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memorySpecJsonSchema: JsonSchema;memorySpecJsonSchemas
Memory Spec JSON Schemas constant exported by the index module.
- Kind: constant
- Import:
import { memorySpecJsonSchemas } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memorySpecJsonSchemas: Record<string, JsonSchema>;memorySpecSchema
Runtime schema for Memory Spec.
- Kind: constant
- Import:
import { memorySpecSchema } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const memorySpecSchema: (typeof import('@codesoul-co/hypha-memory'))['memorySpecSchema'];This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.
memoryTypeSchema
Runtime schema for Memory Type.
- Kind: constant
- Import:
import { memoryTypeSchema } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare const memoryTypeSchema: z.ZodEnum<["working", "episodic", "semantic", "procedural", "artifact", "governance"]>;validateMemorySpec
Validate Memory Spec function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateMemorySpec } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export declare function validateMemorySpec(input: unknown): MemorySpec;Call signature
validateMemorySpec(input: unknown): MemorySpecParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MemorySpec - Description: The return contract is defined by the type shown above.
ArtifactMeta
Artifact Meta interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactMeta } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface ArtifactMeta {
contentType?: string;
sizeBytes?: number;
hash?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
contentType | property | contentType?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
hash | property | hash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
sizeBytes | property | sizeBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactRef
Artifact Ref interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactRef } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface ArtifactRef {
id: string;
path: string;
meta?: ArtifactMeta;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
meta | property | meta?: ArtifactMeta | Public property; its type, readonly modifier and optionality are shown in the signature. |
path | property | path: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactStoreProvider
Artifact Store Provider interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactStoreProvider } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface ArtifactStoreProvider {
put(path: string, content: Buffer | string, meta?: ArtifactMeta): Promise<ArtifactRef>;
get(ref: ArtifactRef): Promise<Buffer>;
delete(ref: ArtifactRef): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
delete | method | delete(ref: ArtifactRef): Promise<void> | Public method; parameters and return type are shown in the signature. |
get | method | get(ref: ArtifactRef): Promise<Buffer> | Public method; parameters and return type are shown in the signature. |
put | method | put(path: string, content: Buffer | string, meta?: ArtifactMeta): Promise<ArtifactRef> | Public method; parameters and return type are shown in the signature. |
EmbeddingProvider
Embedding Provider interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { EmbeddingProvider } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface EmbeddingProvider {
embed(input: string[]): Promise<number[][]>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
embed | method | embed(input: string[]): Promise<number[][]> | Public method; parameters and return type are shown in the signature. |
MemoryAuditOptions
Memory Audit Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemoryAuditOptions } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryAuditOptions {
since?: string;
until?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
since | property | since?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
until | property | until?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryAuditReport
Memory Audit Report interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryAuditReport } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryAuditReport {
scope: MemoryScope;
recordsChecked: number;
missingProvenance: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
missingProvenance | property | missingProvenance: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordsChecked | property | recordsChecked: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: MemoryScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryManagerOptions
Memory Manager Options interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryManagerOptions } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryManagerOptions {
trace?: TraceRecorder;
traceContext?: MemoryTraceContext;
now?: () => string;
recovery?: MemoryManagerRecoveryOptions;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
recovery | property | recovery?: MemoryManagerRecoveryOptions | Public property; its type, readonly modifier and optionality are shown in the signature. |
trace | property | trace?: TraceRecorder | Public property; its type, readonly modifier and optionality are shown in the signature. |
traceContext | property | traceContext?: MemoryTraceContext | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryManagerRecoveryOptions
Memory Manager Recovery Options interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { MemoryManagerRecoveryOptions } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryManagerRecoveryOptions {
providerId?: string;
providerRevision?: string;
specRevision?: string;
policyRevision?: string;
onFailure?: (failure: RecoveryFailure) => void | Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
onFailure | method | onFailure?(failure: RecoveryFailure): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
policyRevision | property | policyRevision?: 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. |
providerRevision | property | providerRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
specRevision | property | specRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryProvider
Memory Provider interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MemoryProvider } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryProvider {
read(scope: MemoryScope, query: MemoryReadQuery): Promise<MemoryRecord[]>;
search(scope: MemoryScope, query: MemorySearchQuery): Promise<MemorySearchResult[]>;
write(scope: MemoryScope, record: MemoryRecord, policy: MemoryWritePolicy): Promise<MemoryWriteResult>;
update(scope: MemoryScope, recordId: string, patch: Partial<MemoryRecord>): Promise<void>;
invalidate(scope: MemoryScope, recordId: string, reason: string): Promise<void>;
summarize(scope: MemoryScope, options?: MemorySummaryOptions): Promise<MemorySummary>;
audit(scope: MemoryScope, options?: MemoryAuditOptions): Promise<MemoryAuditReport>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
audit | method | audit(scope: MemoryScope, options?: MemoryAuditOptions): Promise<MemoryAuditReport> | Public method; parameters and return type are shown in the signature. |
invalidate | method | invalidate(scope: MemoryScope, recordId: string, reason: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
read | method | read(scope: MemoryScope, query: MemoryReadQuery): Promise<MemoryRecord[]> | Public method; parameters and return type are shown in the signature. |
search | method | search(scope: MemoryScope, query: MemorySearchQuery): Promise<MemorySearchResult[]> | Public method; parameters and return type are shown in the signature. |
summarize | method | summarize(scope: MemoryScope, options?: MemorySummaryOptions): Promise<MemorySummary> | Public method; parameters and return type are shown in the signature. |
update | method | update(scope: MemoryScope, recordId: string, patch: Partial<MemoryRecord>): Promise<void> | Public method; parameters and return type are shown in the signature. |
write | method | write(scope: MemoryScope, record: MemoryRecord, policy: MemoryWritePolicy): Promise<MemoryWriteResult> | Public method; parameters and return type are shown in the signature. |
MemoryProviderProfile
Memory Provider Profile interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryProviderProfile } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryProviderProfile {
id: string;
type: 'structured' | 'vector' | 'artifact' | 'hybrid';
providerRef: string;
configSchema?: JsonSchema;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
configSchema | property | configSchema?: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerRef | property | providerRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "artifact" | "structured" | "vector" | "hybrid" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryReadQuery
Memory Read Query interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryReadQuery } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryReadQuery {
ids?: string[];
type?: MemoryType;
limit?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
ids | property | ids?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type?: MemoryType | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRecord
Memory Record interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRecord } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryRecord<TValue = unknown> {
id: string;
type: MemoryType;
value: TValue;
source?: string;
confidence?: number;
provenance: Record<string, unknown>;
visibility?: 'private' | 'workspace' | 'public';
expiresAt?: string;
createdAt: string;
updatedAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
confidence | property | confidence?: number | 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. |
expiresAt | property | expiresAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
provenance | property | provenance: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
source | property | source?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: MemoryType | 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. |
value | property | value: TValue | Public property; its type, readonly modifier and optionality are shown in the signature. |
visibility | property | visibility?: "workspace" | "private" | "public" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRetrievalPolicy
Memory Retrieval Policy interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetrievalPolicy } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryRetrievalPolicy {
defaultTopK?: number;
vectorWeight?: number;
textWeight?: number;
requireScope?: boolean;
allowedTypes?: MemoryType[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowedTypes | property | allowedTypes?: MemoryType[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
defaultTopK | property | defaultTopK?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
requireScope | property | requireScope?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
textWeight | property | textWeight?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
vectorWeight | property | vectorWeight?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryScope
Memory Scope interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryScope } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryScope {
workspaceId?: string;
sessionId?: string;
runId?: string;
userId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
runId | property | runId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemorySearchQuery
Memory Search Query interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemorySearchQuery } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemorySearchQuery {
text?: string;
vector?: number[];
type?: MemoryType;
topK?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
text | property | text?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
topK | property | topK?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type?: MemoryType | Public property; its type, readonly modifier and optionality are shown in the signature. |
vector | property | vector?: number[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemorySearchResult
Memory Search Result interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemorySearchResult } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemorySearchResult {
record: MemoryRecord;
score?: number;
provenance: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
provenance | property | provenance: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
record | property | record: MemoryRecord<unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
score | property | score?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemorySpec
Memory Spec interface with 23 public fields or methods.
- Kind: interface
- Import:
import type { MemorySpec } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemorySpec extends VersionedSpec, SpecMetadata {
providers: MemoryProviderProfile[];
memoryTypes: MemoryType[];
structuredStoreRef?: string;
vectorIndexRef?: string;
artifactStoreRef?: string;
embeddingProviderRef?: string;
readPolicy?: string;
writePolicy?: string;
freshnessPolicy?: string;
provenancePolicy?: 'required' | 'best_effort';
retentionPolicy?: string;
privacyPolicy?: string;
retrievalStrategy?: string;
retrievalPolicy?: MemoryRetrievalPolicy;
writePolicyConfig?: MemoryWritePolicy;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactStoreRef | property | artifactStoreRef?: 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. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
embeddingProviderRef | property | embeddingProviderRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
freshnessPolicy | property | freshnessPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryTypes | property | memoryTypes: MemoryType[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
privacyPolicy | property | privacyPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
provenancePolicy | property | provenancePolicy?: "required" | "best_effort" | Public property; its type, readonly modifier and optionality are shown in the signature. |
providers | property | providers: MemoryProviderProfile[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
readPolicy | property | readPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
retentionPolicy | property | retentionPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
retrievalPolicy | property | retrievalPolicy?: MemoryRetrievalPolicy | Public property; its type, readonly modifier and optionality are shown in the signature. |
retrievalStrategy | property | retrievalStrategy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
structuredStoreRef | property | structuredStoreRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: 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. |
vectorIndexRef | property | vectorIndexRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
writePolicy | property | writePolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
writePolicyConfig | property | writePolicyConfig?: MemoryWritePolicy | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemorySummary
Memory Summary interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemorySummary } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemorySummary {
scope: MemoryScope;
recordCount: number;
types: Partial<Record<MemoryType, number>>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
recordCount | property | recordCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: MemoryScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
types | property | types: Partial<Record<MemoryType, number>> | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemorySummaryOptions
Memory Summary Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemorySummaryOptions } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemorySummaryOptions {
type?: MemoryType;
limit?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type?: MemoryType | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryTraceContext
Memory Trace Context interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MemoryTraceContext } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryTraceContext {
runId?: string;
stepId?: string;
sessionId?: string;
userId?: string;
agentId?: string;
workspaceId?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentId | property | agentId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stepId | property | stepId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryWritePolicy
Memory Write Policy interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryWritePolicy } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryWritePolicy {
allowLongTerm?: boolean;
requireProvenance?: boolean;
decision?: PolicyDecision;
idempotencyKey?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowLongTerm | property | allowLongTerm?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
decision | property | decision?: PolicyDecision | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requireProvenance | property | requireProvenance?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryWriteResult
Memory Write Result interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryWriteResult } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface MemoryWriteResult {
recordId: string;
vectorIndexed?: boolean;
artifactRef?: ArtifactRef;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactRef | property | artifactRef?: ArtifactRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordId | property | recordId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
vectorIndexed | property | vectorIndexed?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
StructuredQuery
Structured Query interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { StructuredQuery } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface StructuredQuery {
where?: Record<string, unknown>;
limit?: number;
orderBy?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
orderBy | property | orderBy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
where | property | where?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
StructuredStoreProvider
Structured Store Provider interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { StructuredStoreProvider } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface StructuredStoreProvider {
get<T>(table: string, id: string): Promise<T | null>;
insert<T extends {
id: string;
}>(table: string, record: T): Promise<void>;
update<T>(table: string, id: string, patch: Partial<T>): Promise<void>;
compareAndSet?<T>(table: string, id: string, expected: Partial<T>, patch: Partial<T>): Promise<boolean>;
delete(table: string, id: string): Promise<void>;
query<T>(table: string, query: StructuredQuery): Promise<T[]>;
transaction<T>(fn: (tx: StructuredStoreProvider) => Promise<T>): Promise<T>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
compareAndSet | method | compareAndSet?<T>(table: string, id: string, expected: Partial<T>, patch: Partial<T>): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
delete | method | delete(table: string, id: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
get | method | get<T>(table: string, id: string): Promise<T | null> | Public method; parameters and return type are shown in the signature. |
insert | method | insert<T extends { id: string; }>(table: string, record: T): Promise<void> | Public method; parameters and return type are shown in the signature. |
query | method | query<T>(table: string, query: StructuredQuery): Promise<T[]> | Public method; parameters and return type are shown in the signature. |
transaction | method | transaction<T>(fn: (tx: StructuredStoreProvider) => Promise<T>): Promise<T> | Public method; parameters and return type are shown in the signature. |
update | method | update<T>(table: string, id: string, patch: Partial<T>): Promise<void> | Public method; parameters and return type are shown in the signature. |
VectorIndexProvider
Vector Index Provider interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { VectorIndexProvider } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface VectorIndexProvider {
upsert(records: VectorRecord[]): Promise<void>;
search(query: VectorQuery): Promise<VectorSearchResult[]>;
delete(ids: string[]): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
delete | method | delete(ids: string[]): Promise<void> | Public method; parameters and return type are shown in the signature. |
search | method | search(query: VectorQuery): Promise<VectorSearchResult[]> | Public method; parameters and return type are shown in the signature. |
upsert | method | upsert(records: VectorRecord[]): Promise<void> | Public method; parameters and return type are shown in the signature. |
VectorQuery
Vector Query interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { VectorQuery } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface VectorQuery {
vector: number[];
topK: number;
filter?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
filter | property | filter?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
topK | property | topK: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
vector | property | vector: number[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
VectorRecord
Vector Record interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { VectorRecord } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface VectorRecord {
id: string;
vector: number[];
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
vector | property | vector: number[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
VectorSearchResult
Vector Search Result interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { VectorSearchResult } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export interface VectorSearchResult {
id: string;
score: number;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
score | property | score: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryType
Public type alias for Memory Type; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MemoryType } from '@codesoul-co/hypha-memory'; - Source module:
index
Declaration
export type MemoryType = 'working' | 'episodic' | 'semantic' | 'procedural' | 'artifact' | 'governance';