@codesoul-co/hypha-memory / contracts
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/contracts.ts - Exports: 30
Using this module
Use the Contracts module for declaring and runtime-validating contracts. It exports 28 interfaces, 2 types.
Import from the package entrypoint
import type {
EmbeddingProviderSpec,
ManagedMemoryRecord,
ManagedMemoryScope,
MemoryConflictPolicySpec,
MemoryConsolidationPolicySpec,
MemoryContractSpecRef,
MemoryEntityRef,
MemoryFallbackPolicySpec,
} from '@codesoul-co/hypha-memory';
// The complete export list is documented below.Usage patterns
- Use the 30 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
EmbeddingProviderSpec | interface | interface EmbeddingProviderSpec | Embedding Provider Spec interface with 11 public fields or methods. |
ManagedMemoryRecord | interface | interface ManagedMemoryRecord | Managed Memory Record interface with 38 public fields or methods. |
ManagedMemoryScope | interface | interface ManagedMemoryScope | Managed Memory Scope interface with 8 public fields or methods. |
MemoryConflictPolicySpec | interface | interface MemoryConflictPolicySpec | Memory Conflict Policy Spec interface with 4 public fields or methods. |
MemoryConsolidationPolicySpec | interface | interface MemoryConsolidationPolicySpec | Memory Consolidation Policy Spec interface with 8 public fields or methods. |
MemoryContractSpecRef | interface | interface MemoryContractSpecRef extends SpecRef | Memory Contract Spec Ref interface with 3 public fields or methods. |
MemoryEntityRef | interface | interface MemoryEntityRef | Memory Entity Ref interface with 4 public fields or methods. |
MemoryFallbackPolicySpec | interface | interface MemoryFallbackPolicySpec | Memory Fallback Policy Spec interface with 4 public fields or methods. |
MemoryIndexingPolicySpec | interface | interface MemoryIndexingPolicySpec | Memory Indexing Policy Spec interface with 6 public fields or methods. |
MemoryIndexStatus | interface | interface MemoryIndexStatus | Memory Index Status interface with 4 public fields or methods. |
MemoryManagementCapabilities | interface | interface MemoryManagementCapabilities | Memory Management Capabilities interface with 17 public fields or methods. |
MemoryManagementProviderSpec | interface | interface MemoryManagementProviderSpec | Memory Management Provider Spec interface with 14 public fields or methods. |
MemoryPrincipal | interface | interface MemoryPrincipal | Memory Principal interface with 8 public fields or methods. |
MemoryPrivacyPolicySpec | interface | interface MemoryPrivacyPolicySpec | Memory Privacy Policy Spec interface with 6 public fields or methods. |
MemoryProfileSpec | interface | interface MemoryProfileSpec | Memory Profile Spec interface with 25 public fields or methods. |
MemoryProvenance | interface | interface MemoryProvenance | Memory Provenance interface with 9 public fields or methods. |
MemoryRecordStoreSpec | interface | interface MemoryRecordStoreSpec | Memory Record Store Spec interface with 10 public fields or methods. |
MemoryRelation | interface | interface MemoryRelation | Memory Relation interface with 4 public fields or methods. |
MemoryRetentionPolicySpec | interface | interface MemoryRetentionPolicySpec | Memory Retention Policy Spec interface with 8 public fields or methods. |
MemoryRetrievalPolicySpec | interface | interface MemoryRetrievalPolicySpec | Memory Retrieval Policy Spec interface with 14 public fields or methods. |
MemoryScopePolicySpec | interface | interface MemoryScopePolicySpec | Memory Scope Policy Spec interface with 7 public fields or methods. |
MemorySource | interface | interface MemorySource | Memory Source interface with 6 public fields or methods. |
MemoryVectorRef | interface | interface MemoryVectorRef | Memory Vector Ref interface with 8 public fields or methods. |
MemoryWritePolicySpec | interface | interface MemoryWritePolicySpec | Memory Write Policy Spec interface with 9 public fields or methods. |
NormalizedMemoryError | interface | interface NormalizedMemoryError | Normalized Memory Error interface with 6 public fields or methods. |
VectorStoreCapabilities | interface | interface VectorStoreCapabilities | Vector Store Capabilities interface with 12 public fields or methods. |
VectorStoreSpec | interface | interface VectorStoreSpec | Vector Store Spec interface with 12 public fields or methods. |
WorkingMemoryStoreSpec | interface | interface WorkingMemoryStoreSpec | Working Memory Store Spec interface with 10 public fields or methods. |
ManagedMemoryType | type | type ManagedMemoryType = 'working' | 'episodic' | 'semantic' | 'procedural' | 'preference' | 'artifact' | 'governance' | 'reflection' | 'custom' | Public type alias for Managed Memory Type; the declaration contains its complete type expression. |
MemoryStatus | type | type MemoryStatus = 'pending' | 'active' | 'dormant' | 'superseded' | 'invalidated' | 'deletion_pending' | 'deleted' | 'failed' | Public type alias for Memory Status; the declaration contains its complete type expression. |
EmbeddingProviderSpec
Embedding Provider Spec interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { EmbeddingProviderSpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface EmbeddingProviderSpec {
id: string;
version: string;
provider: string;
model: string;
dimensions?: number;
normalized?: boolean;
maxBatchSize?: number;
maxInputTokens?: number;
connectionRef?: string;
timeoutMs?: number;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
connectionRef | property | connectionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
dimensions | property | dimensions?: number | 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. |
maxBatchSize | property | maxBatchSize?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxInputTokens | property | maxInputTokens?: number | 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. |
model | property | model: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
normalized | property | normalized?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
provider | property | provider: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutMs | property | timeoutMs?: number | 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. |
ManagedMemoryRecord
Managed Memory Record interface with 38 public fields or methods.
- Kind: interface
- Import:
import type { ManagedMemoryRecord } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface ManagedMemoryRecord<TContent = unknown> {
id: string;
versionId: string;
revision: number;
type: ManagedMemoryType;
subtype?: string;
content: TContent;
canonicalText?: string;
summary?: string;
language?: string;
scope: ManagedMemoryScope;
visibility: 'private' | 'session' | 'workspace' | 'tenant' | 'shared';
source: MemorySource;
provenance: MemoryProvenance;
confidence?: number;
importance?: number;
strength?: number;
salience?: number;
accessCount: number;
lastAccessedAt?: string;
lastReinforcedAt?: string;
decayScore?: number;
status: MemoryStatus;
immutable?: boolean;
humanVerified?: boolean;
sensitive?: boolean;
tags?: string[];
entities?: MemoryEntityRef[];
relations?: MemoryRelation[];
indexStatus: MemoryIndexStatus;
vectorRefs?: MemoryVectorRef[];
artifactRefs?: string[];
contentHash: string;
scopeHash: string;
createdAt: string;
updatedAt: string;
expiresAt?: string;
deletedAt?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
accessCount | property | accessCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
artifactRefs | property | artifactRefs?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
canonicalText | property | canonicalText?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
confidence | property | confidence?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
content | property | content: TContent | Public property; its type, readonly modifier and optionality are shown in the signature. |
contentHash | property | contentHash: 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. |
decayScore | property | decayScore?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
deletedAt | property | deletedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
entities | property | entities?: MemoryEntityRef[] | 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. |
humanVerified | property | humanVerified?: boolean | 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. |
immutable | property | immutable?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
importance | property | importance?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
indexStatus | property | indexStatus: MemoryIndexStatus | Public property; its type, readonly modifier and optionality are shown in the signature. |
language | property | language?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastAccessedAt | property | lastAccessedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastReinforcedAt | property | lastReinforcedAt?: 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. |
provenance | property | provenance: MemoryProvenance | Public property; its type, readonly modifier and optionality are shown in the signature. |
relations | property | relations?: MemoryRelation[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
salience | property | salience?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: ManagedMemoryScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeHash | property | scopeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sensitive | property | sensitive?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
source | property | source: MemorySource | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: MemoryStatus | Public property; its type, readonly modifier and optionality are shown in the signature. |
strength | property | strength?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
subtype | property | subtype?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
summary | property | summary?: 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. |
type | property | type: ManagedMemoryType | 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. |
vectorRefs | property | vectorRefs?: MemoryVectorRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
versionId | property | versionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
visibility | property | visibility: "workspace" | "session" | "private" | "shared" | "tenant" | Public property; its type, readonly modifier and optionality are shown in the signature. |
ManagedMemoryScope
Managed Memory Scope interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { ManagedMemoryScope } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface ManagedMemoryScope {
tenantId?: string;
userId: string;
workspaceId?: string;
projectId?: string;
sessionId?: string;
runId?: string;
agentId?: string;
domainPackId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentId | property | agentId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
domainPackId | property | domainPackId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
projectId | property | projectId?: string | 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. |
tenantId | property | tenantId?: 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. |
MemoryConflictPolicySpec
Memory Conflict Policy Spec interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryConflictPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryConflictPolicySpec {
detectOnWrite: boolean;
matchingMode: 'same_key' | 'semantic' | 'entity_relation' | 'custom';
resolution: 'keep_both' | 'prefer_latest' | 'prefer_verified' | 'require_human' | 'custom';
markRelations?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
detectOnWrite | property | detectOnWrite: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
markRelations | property | markRelations?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
matchingMode | property | matchingMode: "custom" | "semantic" | "same_key" | "entity_relation" | Public property; its type, readonly modifier and optionality are shown in the signature. |
resolution | property | resolution: "custom" | "prefer_latest" | "prefer_verified" | "keep_both" | "require_human" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryConsolidationPolicySpec
Memory Consolidation Policy Spec interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryConsolidationPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryConsolidationPolicySpec {
enabled: boolean;
trigger: 'scheduled' | 'count' | 'token_pressure' | 'manual';
minRecords?: number;
intervalSeconds?: number;
similarityThreshold?: number;
preserveSourceRecords?: boolean;
summaryMemoryType?: ManagedMemoryType;
requireVerification?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
enabled | property | enabled: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
intervalSeconds | property | intervalSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
minRecords | property | minRecords?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
preserveSourceRecords | property | preserveSourceRecords?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
requireVerification | property | requireVerification?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
similarityThreshold | property | similarityThreshold?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
summaryMemoryType | property | summaryMemoryType?: ManagedMemoryType | Public property; its type, readonly modifier and optionality are shown in the signature. |
trigger | property | trigger: "manual" | "scheduled" | "count" | "token_pressure" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryContractSpecRef
Memory Contract Spec Ref interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryContractSpecRef } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryContractSpecRef extends SpecRef {
revision?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | 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. |
version | property | version?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryEntityRef
Memory Entity Ref interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryEntityRef } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryEntityRef {
entityId: string;
label?: string;
type?: string;
confidence?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
confidence | property | confidence?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
entityId | property | entityId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
label | property | label?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryFallbackPolicySpec
Memory Fallback Policy Spec interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryFallbackPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryFallbackPolicySpec {
onProviderUnavailable: 'fail' | 'native' | 'record_store_only' | 'skip';
onVectorUnavailable: 'structured_only' | 'keyword' | 'fail';
onRerankerUnavailable: 'score_fusion' | 'no_rerank' | 'fail';
maxFallbackDepth?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
maxFallbackDepth | property | maxFallbackDepth?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
onProviderUnavailable | property | onProviderUnavailable: "fail" | "native" | "record_store_only" | "skip" | Public property; its type, readonly modifier and optionality are shown in the signature. |
onRerankerUnavailable | property | onRerankerUnavailable: "fail" | "score_fusion" | "no_rerank" | Public property; its type, readonly modifier and optionality are shown in the signature. |
onVectorUnavailable | property | onVectorUnavailable: "fail" | "keyword" | "structured_only" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryIndexingPolicySpec
Memory Indexing Policy Spec interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { MemoryIndexingPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryIndexingPolicySpec {
mode: 'sync' | 'async_outbox' | 'disabled';
batchSize?: number;
maxAttempts?: number;
retryDelayMs?: number;
deadLetterAfterAttempts?: number;
rebuildable: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
batchSize | property | batchSize?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadLetterAfterAttempts | property | deadLetterAfterAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxAttempts | property | maxAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "disabled" | "sync" | "async_outbox" | Public property; its type, readonly modifier and optionality are shown in the signature. |
rebuildable | property | rebuildable: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryDelayMs | property | retryDelayMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryIndexStatus
Memory Index Status interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryIndexStatus } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryIndexStatus {
state: 'none' | 'pending' | 'indexing' | 'indexed' | 'partial' | 'failed' | 'deleted';
attempts: number;
lastAttemptAt?: string;
lastError?: NormalizedMemoryError;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempts | property | attempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastAttemptAt | property | lastAttemptAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastError | property | lastError?: NormalizedMemoryError | Public property; its type, readonly modifier and optionality are shown in the signature. |
state | property | state: "none" | "failed" | "deleted" | "pending" | "indexing" | "indexed" | "partial" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryManagementCapabilities
Memory Management Capabilities interface with 17 public fields or methods.
- Kind: interface
- Import:
import type { MemoryManagementCapabilities } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryManagementCapabilities {
add: boolean;
search: boolean;
get: boolean;
list: boolean;
update: boolean;
delete: boolean;
deleteByFilter: boolean;
history: boolean;
summarize: boolean;
consolidate: boolean;
decay: boolean;
reinforce: boolean;
conflictDetection: boolean;
hybridSearch: boolean;
graphRelations: boolean;
asyncWrite: boolean;
batchOperations: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
add | property | add: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
asyncWrite | property | asyncWrite: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
batchOperations | property | batchOperations: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
conflictDetection | property | conflictDetection: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
consolidate | property | consolidate: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
decay | property | decay: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
delete | property | delete: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
deleteByFilter | property | deleteByFilter: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
get | property | get: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
graphRelations | property | graphRelations: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
history | property | history: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
hybridSearch | property | hybridSearch: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
list | property | list: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
reinforce | property | reinforce: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
search | property | search: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
summarize | property | summarize: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
update | property | update: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryManagementProviderSpec
Memory Management Provider Spec interface with 14 public fields or methods.
- Kind: interface
- Import:
import type { MemoryManagementProviderSpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryManagementProviderSpec {
id: string;
version: string;
revision?: string;
name?: string;
type: 'native' | 'mem0' | 'memorybank' | 'custom';
deployment: 'embedded' | 'local' | 'self_hosted' | 'managed' | 'remote';
connectionRef?: string;
config?: Record<string, unknown>;
capabilities: MemoryManagementCapabilities;
timeoutPolicy?: {
timeoutMs: number;
operationTimeouts?: Partial<Record<'add' | 'search' | 'get' | 'list' | 'update' | 'delete', number>>;
};
retryPolicy?: {
maxAttempts: number;
initialDelayMs?: number;
maxDelayMs?: number;
backoff?: 'fixed' | 'exponential';
};
circuitBreakerPolicy?: {
failureThreshold: number;
resetAfterMs: number;
};
healthCheckPolicy?: {
intervalMs?: number;
timeoutMs?: number;
};
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
capabilities | property | capabilities: MemoryManagementCapabilities | Public property; its type, readonly modifier and optionality are shown in the signature. |
circuitBreakerPolicy | property | circuitBreakerPolicy?: { failureThreshold: number; resetAfterMs: number; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
config | property | config?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
connectionRef | property | connectionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deployment | property | deployment: "local" | "self_hosted" | "managed" | "embedded" | "remote" | Public property; its type, readonly modifier and optionality are shown in the signature. |
healthCheckPolicy | property | healthCheckPolicy?: { intervalMs?: number; timeoutMs?: number; } | 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. |
metadata | property | metadata?: Record<string, unknown> | 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. |
retryPolicy | property | retryPolicy?: { maxAttempts: number; initialDelayMs?: number; maxDelayMs?: number; backoff?: "fixed" | "exponential"; } | 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. |
timeoutPolicy | property | timeoutPolicy?: { timeoutMs: number; operationTimeouts?: Partial<Record<"add" | "search" | "get" | "list" | "update" | "delete", number>>; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "custom" | "native" | "mem0" | "memorybank" | 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. |
MemoryPrincipal
Memory Principal interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryPrincipal } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryPrincipal {
principalId: string;
type: 'user' | 'agent' | 'service' | 'system';
tenantId?: string;
userId?: string;
agentId?: string;
roles?: string[];
permissionScopes: 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. |
permissionScopes | property | permissionScopes: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
principalId | property | principalId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
roles | property | roles?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "system" | "agent" | "user" | "service" | 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. |
MemoryPrivacyPolicySpec
Memory Privacy Policy Spec interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { MemoryPrivacyPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryPrivacyPolicySpec {
sensitiveDataMode: 'reject' | 'redact' | 'encrypt' | 'allow_by_policy';
encryptionRef?: MemoryContractSpecRef;
redactFields?: string[];
allowCrossUserRead?: boolean;
allowCrossWorkspaceRead?: boolean;
complianceDelete?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowCrossUserRead | property | allowCrossUserRead?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
allowCrossWorkspaceRead | property | allowCrossWorkspaceRead?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
complianceDelete | property | complianceDelete?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
encryptionRef | property | encryptionRef?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
redactFields | property | redactFields?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
sensitiveDataMode | property | sensitiveDataMode: "reject" | "redact" | "encrypt" | "allow_by_policy" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryProfileSpec
Memory Profile Spec interface with 25 public fields or methods.
- Kind: interface
- Import:
import type { MemoryProfileSpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryProfileSpec {
id: string;
version: string;
revision?: string;
name?: string;
description?: string;
enabled?: boolean;
managementProviderRef: MemoryContractSpecRef;
workingStoreRef?: MemoryContractSpecRef;
recordStoreRef: MemoryContractSpecRef;
vectorStoreRefs?: MemoryContractSpecRef[];
artifactStoreRef?: MemoryContractSpecRef;
embeddingProviderRef?: MemoryContractSpecRef;
rerankerProviderRef?: MemoryContractSpecRef;
scopePolicy: MemoryScopePolicySpec;
retrievalPolicy: MemoryRetrievalPolicySpec;
writePolicy: MemoryWritePolicySpec;
retentionPolicy: MemoryRetentionPolicySpec;
consolidationPolicy?: MemoryConsolidationPolicySpec;
conflictPolicy?: MemoryConflictPolicySpec;
fallbackPolicy?: MemoryFallbackPolicySpec;
privacyPolicy?: MemoryPrivacyPolicySpec;
indexingPolicy?: MemoryIndexingPolicySpec;
contextProfileRef?: MemoryContractSpecRef;
tags?: string[];
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactStoreRef | property | artifactStoreRef?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
conflictPolicy | property | conflictPolicy?: MemoryConflictPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
consolidationPolicy | property | consolidationPolicy?: MemoryConsolidationPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
contextProfileRef | property | contextProfileRef?: MemoryContractSpecRef | 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?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
enabled | property | enabled?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
fallbackPolicy | property | fallbackPolicy?: MemoryFallbackPolicySpec | 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. |
indexingPolicy | property | indexingPolicy?: MemoryIndexingPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
managementProviderRef | property | managementProviderRef: MemoryContractSpecRef | 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. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
privacyPolicy | property | privacyPolicy?: MemoryPrivacyPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordStoreRef | property | recordStoreRef: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
rerankerProviderRef | property | rerankerProviderRef?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
retentionPolicy | property | retentionPolicy: MemoryRetentionPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
retrievalPolicy | property | retrievalPolicy: MemoryRetrievalPolicySpec | 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. |
scopePolicy | property | scopePolicy: MemoryScopePolicySpec | 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. |
vectorStoreRefs | property | vectorStoreRefs?: MemoryContractSpecRef[] | 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. |
workingStoreRef | property | workingStoreRef?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
writePolicy | property | writePolicy: MemoryWritePolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryProvenance
Memory Provenance interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { MemoryProvenance } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryProvenance {
createdBy: string;
providerId: string;
extractorVersion?: string;
sourceEventIds?: string[];
sourceMemoryIds?: string[];
transformation?: string;
humanDecisionId?: string;
createdAt: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdBy | property | createdBy: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
extractorVersion | property | extractorVersion?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
humanDecisionId | property | humanDecisionId?: 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. |
providerId | property | providerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceEventIds | property | sourceEventIds?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceMemoryIds | property | sourceMemoryIds?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
transformation | property | transformation?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRecordStoreSpec
Memory Record Store Spec interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRecordStoreSpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryRecordStoreSpec {
id: string;
version: string;
type: 'mongodb' | 'sqlite' | 'postgres' | 'custom';
connectionRef?: string;
database?: string;
collectionOrTable?: string;
transactional?: boolean;
historyMode?: 'embedded_versions' | 'separate_versions' | 'event_projection';
encryptionRef?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
collectionOrTable | property | collectionOrTable?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
connectionRef | property | connectionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
database | property | database?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
encryptionRef | property | encryptionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
historyMode | property | historyMode?: "embedded_versions" | "separate_versions" | "event_projection" | 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. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
transactional | property | transactional?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "custom" | "sqlite" | "postgres" | "mongodb" | 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. |
MemoryRelation
Memory Relation interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRelation } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryRelation {
type: 'supports' | 'contradicts' | 'supersedes' | 'derived_from' | 'related_to' | 'same_as' | 'part_of';
targetMemoryId: string;
confidence?: number;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
confidence | property | confidence?: number | 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. |
targetMemoryId | property | targetMemoryId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "supports" | "contradicts" | "supersedes" | "derived_from" | "related_to" | "same_as" | "part_of" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRetentionPolicySpec
Memory Retention Policy Spec interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetentionPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryRetentionPolicySpec {
defaultTtlSeconds?: number;
ttlByType?: Partial<Record<ManagedMemoryType, number>>;
archiveAfterSeconds?: number;
deleteAfterSeconds?: number;
retainHistory?: boolean;
maxVersions?: number;
legalHoldSupported?: boolean;
deletionMode?: 'soft' | 'hard';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
archiveAfterSeconds | property | archiveAfterSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
defaultTtlSeconds | property | defaultTtlSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
deleteAfterSeconds | property | deleteAfterSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
deletionMode | property | deletionMode?: "soft" | "hard" | Public property; its type, readonly modifier and optionality are shown in the signature. |
legalHoldSupported | property | legalHoldSupported?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxVersions | property | maxVersions?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
retainHistory | property | retainHistory?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlByType | property | ttlByType?: Partial<Record<ManagedMemoryType, number>> | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRetrievalPolicySpec
Memory Retrieval Policy Spec interface with 14 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetrievalPolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryRetrievalPolicySpec {
defaultMode: 'structured' | 'semantic' | 'keyword' | 'hybrid';
maxCandidates: number;
defaultTopK: number;
scoreThreshold?: number;
memoryTypePriority?: Partial<Record<ManagedMemoryType, number>>;
sourcePriority?: Partial<Record<MemorySource['type'], number>>;
recencyWeight?: number;
importanceWeight?: number;
confidenceWeight?: number;
reinforcementWeight?: number;
deduplication: 'none' | 'id' | 'hash' | 'semantic';
semanticDedupThreshold?: number;
conflictHandling?: 'include_marked' | 'prefer_latest' | 'prefer_verified' | 'exclude_conflicts';
rerank?: 'none' | 'score_fusion' | 'provider' | 'custom';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
confidenceWeight | property | confidenceWeight?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
conflictHandling | property | conflictHandling?: "include_marked" | "prefer_latest" | "prefer_verified" | "exclude_conflicts" | Public property; its type, readonly modifier and optionality are shown in the signature. |
deduplication | property | deduplication: "none" | "id" | "semantic" | "hash" | Public property; its type, readonly modifier and optionality are shown in the signature. |
defaultMode | property | defaultMode: "structured" | "hybrid" | "semantic" | "keyword" | 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. |
importanceWeight | property | importanceWeight?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxCandidates | property | maxCandidates: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryTypePriority | property | memoryTypePriority?: Partial<Record<ManagedMemoryType, number>> | Public property; its type, readonly modifier and optionality are shown in the signature. |
recencyWeight | property | recencyWeight?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
reinforcementWeight | property | reinforcementWeight?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
rerank | property | rerank?: "none" | "provider" | "custom" | "score_fusion" | Public property; its type, readonly modifier and optionality are shown in the signature. |
scoreThreshold | property | scoreThreshold?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
semanticDedupThreshold | property | semanticDedupThreshold?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourcePriority | property | sourcePriority?: Partial<Record<"human_review" | "artifact" | "system" | "derived" | "user_message" | "assistant_message" | "tool_result" | "workflow_state" | "import", number>> | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryScopePolicySpec
Memory Scope Policy Spec interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MemoryScopePolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryScopePolicySpec {
requiredDimensions: Array<keyof ManagedMemoryScope>;
allowedReadScopes: Array<keyof ManagedMemoryScope>;
allowedWriteScopes: Array<keyof ManagedMemoryScope>;
inheritanceOrder?: Array<keyof ManagedMemoryScope>;
crossUserRead?: 'deny' | 'policy';
crossWorkspaceRead?: 'deny' | 'policy';
enforceTenantBoundary?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowedReadScopes | property | allowedReadScopes: (keyof ManagedMemoryScope)[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
allowedWriteScopes | property | allowedWriteScopes: (keyof ManagedMemoryScope)[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
crossUserRead | property | crossUserRead?: "deny" | "policy" | Public property; its type, readonly modifier and optionality are shown in the signature. |
crossWorkspaceRead | property | crossWorkspaceRead?: "deny" | "policy" | Public property; its type, readonly modifier and optionality are shown in the signature. |
enforceTenantBoundary | property | enforceTenantBoundary?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
inheritanceOrder | property | inheritanceOrder?: (keyof ManagedMemoryScope)[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
requiredDimensions | property | requiredDimensions: (keyof ManagedMemoryScope)[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemorySource
Memory Source interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { MemorySource } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemorySource {
type: 'user_message' | 'assistant_message' | 'tool_result' | 'artifact' | 'workflow_state' | 'human_review' | 'import' | 'derived' | 'system';
sourceId?: string;
sourceEventId?: string;
sourceRunId?: string;
sourceMessageId?: string;
sourceArtifactId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
sourceArtifactId | property | sourceArtifactId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceEventId | property | sourceEventId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceId | property | sourceId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceMessageId | property | sourceMessageId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceRunId | property | sourceRunId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "human_review" | "artifact" | "system" | "derived" | "user_message" | "assistant_message" | "tool_result" | "workflow_state" | "import" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryVectorRef
Memory Vector Ref interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryVectorRef } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryVectorRef {
vectorStoreId: string;
indexName: string;
vectorId: string;
embeddingProviderId: string;
embeddingModel: string;
embeddingRevision?: string;
dimensions?: number;
indexedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
dimensions | property | dimensions?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
embeddingModel | property | embeddingModel: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
embeddingProviderId | property | embeddingProviderId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
embeddingRevision | property | embeddingRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
indexedAt | property | indexedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
indexName | property | indexName: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
vectorId | property | vectorId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
vectorStoreId | property | vectorStoreId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryWritePolicySpec
Memory Write Policy Spec interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { MemoryWritePolicySpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface MemoryWritePolicySpec {
allowedTypes: ManagedMemoryType[];
autoCaptureSources?: MemorySource['type'][];
requireHumanVerificationFor?: ManagedMemoryType[];
minConfidence?: number;
deduplicateBeforeWrite?: boolean;
conflictDetection?: boolean;
immutableTypes?: ManagedMemoryType[];
maxContentBytes?: number;
sensitiveDataMode?: 'reject' | 'redact' | 'encrypt' | 'allow_by_policy';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowedTypes | property | allowedTypes: ManagedMemoryType[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
autoCaptureSources | property | autoCaptureSources?: ("human_review" | "artifact" | "system" | "derived" | "user_message" | "assistant_message" | "tool_result" | "workflow_state" | "import")[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
conflictDetection | property | conflictDetection?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
deduplicateBeforeWrite | property | deduplicateBeforeWrite?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
immutableTypes | property | immutableTypes?: ManagedMemoryType[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxContentBytes | property | maxContentBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
minConfidence | property | minConfidence?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
requireHumanVerificationFor | property | requireHumanVerificationFor?: ManagedMemoryType[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
sensitiveDataMode | property | sensitiveDataMode?: "reject" | "redact" | "encrypt" | "allow_by_policy" | Public property; its type, readonly modifier and optionality are shown in the signature. |
NormalizedMemoryError
Normalized Memory Error interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { NormalizedMemoryError } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface NormalizedMemoryError {
code: 'MEMORY_INVALID_INPUT' | 'MEMORY_EXTRACTION_SOURCE_UNAVAILABLE' | 'MEMORY_EXTRACTION_FAILED' | 'MEMORY_EXTRACTION_CURSOR_CONFLICT' | 'MEMORY_MAINTENANCE_CONFLICT' | 'MEMORY_RANKING_FAILED' | 'MEMORY_IDEMPOTENCY_CONFLICT' | 'MEMORY_SCOPE_DENIED' | 'MEMORY_PERMISSION_DENIED' | 'MEMORY_NOT_FOUND' | 'MEMORY_REVISION_CONFLICT' | 'MEMORY_PROVIDER_NOT_INSTALLED' | 'MEMORY_PROVIDER_UNAVAILABLE' | 'MEMORY_PROVIDER_TIMEOUT' | 'MEMORY_STORE_UNAVAILABLE' | 'MEMORY_VECTOR_UNAVAILABLE' | 'MEMORY_INDEX_FAILED' | 'MEMORY_DELETE_PARTIAL' | 'MEMORY_POLICY_REJECTED' | 'MEMORY_CONTEXT_BUDGET_EXCEEDED' | 'MEMORY_INTERNAL_ERROR';
message: string;
retryable: boolean;
providerCode?: string;
details?: Record<string, unknown>;
causeRef?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
causeRef | property | causeRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
code | property | code: "MEMORY_INVALID_INPUT" | "MEMORY_EXTRACTION_SOURCE_UNAVAILABLE" | "MEMORY_EXTRACTION_FAILED" | "MEMORY_EXTRACTION_CURSOR_CONFLICT" | "MEMORY_MAINTENANCE_CONFLICT" | "MEMORY_RANKING_FAILED" | "MEMORY_IDEMPOTENCY_CONFLICT" | "MEMORY_SCOPE_DENIED" | "MEMORY_PERMISSION_DENIED" | "MEMORY_NOT_FOUND" | "MEMORY_REVISION_CONFLICT" | "MEMORY_PROVIDER_NOT_INSTALLED" | "MEMORY_PROVIDER_UNAVAILABLE" | "MEMORY_PROVIDER_TI... | Public property; its type, readonly modifier and optionality are shown in the signature. |
details | property | details?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
message | property | message: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerCode | property | providerCode?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryable | property | retryable: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
VectorStoreCapabilities
Vector Store Capabilities interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { VectorStoreCapabilities } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface VectorStoreCapabilities {
denseSearch: boolean;
sparseSearch: boolean;
hybridSearch: boolean;
metadataFilter: boolean;
fullTextFilter: boolean;
namespaces: boolean;
multiVector: boolean;
batchUpsert: boolean;
deleteByFilter: boolean;
payloadUpdate: boolean;
scoreThreshold: boolean;
localDeployment: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
batchUpsert | property | batchUpsert: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
deleteByFilter | property | deleteByFilter: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
denseSearch | property | denseSearch: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
fullTextFilter | property | fullTextFilter: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
hybridSearch | property | hybridSearch: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
localDeployment | property | localDeployment: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadataFilter | property | metadataFilter: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
multiVector | property | multiVector: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
namespaces | property | namespaces: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
payloadUpdate | property | payloadUpdate: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
scoreThreshold | property | scoreThreshold: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
sparseSearch | property | sparseSearch: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
VectorStoreSpec
Vector Store Spec interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { VectorStoreSpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface VectorStoreSpec {
id: string;
version: string;
type: 'local' | 'qdrant' | 'milvus' | 'chroma' | 'pinecone' | 'pgvector' | 'custom';
connectionRef?: string;
collection: string;
namespaceStrategy?: 'scope_hash' | 'metadata_filter' | 'collection_per_tenant';
dimensions?: number;
distance?: 'cosine' | 'dot' | 'l2';
indexType?: string;
capabilities: VectorStoreCapabilities;
writeMode?: 'sync' | 'async_outbox' | 'dual_write';
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
capabilities | property | capabilities: VectorStoreCapabilities | Public property; its type, readonly modifier and optionality are shown in the signature. |
collection | property | collection: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
connectionRef | property | connectionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
dimensions | property | dimensions?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
distance | property | distance?: "cosine" | "dot" | "l2" | 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. |
indexType | property | indexType?: 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. |
namespaceStrategy | property | namespaceStrategy?: "metadata_filter" | "scope_hash" | "collection_per_tenant" | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "local" | "custom" | "pgvector" | "qdrant" | "milvus" | "chroma" | "pinecone" | 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. |
writeMode | property | writeMode?: "sync" | "async_outbox" | "dual_write" | Public property; its type, readonly modifier and optionality are shown in the signature. |
WorkingMemoryStoreSpec
Working Memory Store Spec interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { WorkingMemoryStoreSpec } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export interface WorkingMemoryStoreSpec {
id: string;
version: string;
type: 'in_memory' | 'redis' | 'custom';
connectionRef?: string;
namespace?: string;
defaultTtlSeconds?: number;
maxItemBytes?: number;
serialization?: 'json' | 'msgpack';
encryptionRef?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
connectionRef | property | connectionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
defaultTtlSeconds | property | defaultTtlSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
encryptionRef | property | encryptionRef?: 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. |
maxItemBytes | property | maxItemBytes?: number | 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. |
namespace | property | namespace?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
serialization | property | serialization?: "json" | "msgpack" | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "custom" | "redis" | "in_memory" | 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. |
ManagedMemoryType
Public type alias for Managed Memory Type; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ManagedMemoryType } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export type ManagedMemoryType = 'working' | 'episodic' | 'semantic' | 'procedural' | 'preference' | 'artifact' | 'governance' | 'reflection' | 'custom';MemoryStatus
Public type alias for Memory Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MemoryStatus } from '@codesoul-co/hypha-memory'; - Source module:
contracts
Declaration
export type MemoryStatus = 'pending' | 'active' | 'dormant' | 'superseded' | 'invalidated' | 'deletion_pending' | 'deleted' | 'failed';