@codesoul-co/hypha-memory / retrieval
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/retrieval.ts - Exports: 20
Using this module
Use the Retrieval module for using the public contracts and operations for this capability boundary. It exports 4 classes, 1 function, 14 interfaces, 1 type.
Import from the package entrypoint
import {
DefaultMemoryRetrievalPipeline,
DenseMemoryCandidateGenerator,
KeywordMemoryCandidateGenerator,
StructuredMemoryCandidateGenerator,
normalizeMemoryQuery,
} from '@codesoul-co/hypha-memory';
import type {
DefaultMemoryRetrievalPipelineOptions,
DenseMemoryCandidateGeneratorOptions,
MemoryCandidate,
MemoryCandidateGenerationRequest,
MemoryCandidateGenerator,
MemoryMatchedFragment,
MemoryRankingPolicySpecV2,
MemoryRetrievalExplanation,
} from '@codesoul-co/hypha-memory';
// The complete export list is documented below.Usage patterns
- Use the 15 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 4 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
- The module exposes 1 function as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
DefaultMemoryRetrievalPipeline | class | new DefaultMemoryRetrievalPipeline(options: DefaultMemoryRetrievalPipelineOptions): DefaultMemoryRetrievalPipeline | Default Memory Retrieval Pipeline class with 3 public constructor or member entries; its exact declarations are listed below. |
DenseMemoryCandidateGenerator | class | new DenseMemoryCandidateGenerator(options: DenseMemoryCandidateGeneratorOptions): DenseMemoryCandidateGenerator | Generates scope-fenced dense candidates from the configured vector projection. |
KeywordMemoryCandidateGenerator | class | new KeywordMemoryCandidateGenerator(store: ManagedMemoryRecordStore): KeywordMemoryCandidateGenerator | Keyword Memory Candidate Generator class with 4 public constructor or member entries; its exact declarations are listed below. |
StructuredMemoryCandidateGenerator | class | new StructuredMemoryCandidateGenerator(store: ManagedMemoryRecordStore): StructuredMemoryCandidateGenerator | Structured Memory Candidate Generator class with 4 public constructor or member entries; its exact declarations are listed below. |
normalizeMemoryQuery | function | normalizeMemoryQuery(input: Omit<NormalizedMemoryQuery, "queryHash">): NormalizedMemoryQuery | Normalize Memory Query function with 1 public call signature; parameters and return types are listed below. |
DefaultMemoryRetrievalPipelineOptions | interface | interface DefaultMemoryRetrievalPipelineOptions | Default Memory Retrieval Pipeline Options interface with 4 public fields or methods. |
DenseMemoryCandidateGeneratorOptions | interface | interface DenseMemoryCandidateGeneratorOptions | Dense Memory Candidate Generator Options interface with 2 public fields or methods. |
MemoryCandidate | interface | interface MemoryCandidate | Memory Candidate interface with 8 public fields or methods. |
MemoryCandidateGenerationRequest | interface | interface MemoryCandidateGenerationRequest | Memory Candidate Generation Request interface with 3 public fields or methods. |
MemoryCandidateGenerator | interface | interface MemoryCandidateGenerator | Memory Candidate Generator interface with 3 public fields or methods. |
MemoryMatchedFragment | interface | interface MemoryMatchedFragment | Memory Matched Fragment interface with 5 public fields or methods. |
MemoryRankingPolicySpecV2 | interface | interface MemoryRankingPolicySpecV2 extends MemoryRetrievalPolicySpec | Memory Ranking Policy Spec V2 interface with 19 public fields or methods. |
MemoryRetrievalExplanation | interface | interface MemoryRetrievalExplanation | Memory Retrieval Explanation interface with 8 public fields or methods. |
MemoryRetrievalPipeline | interface | interface MemoryRetrievalPipeline | Memory Retrieval Pipeline interface with 2 public fields or methods. |
MemoryRetrievalRequest | interface | interface MemoryRetrievalRequest | Memory Retrieval Request interface with 7 public fields or methods. |
MemoryRetrievalResult | interface | interface MemoryRetrievalResult | Memory Retrieval Result interface with 3 public fields or methods. |
MemoryRetrievalSnapshot | interface | interface MemoryRetrievalSnapshot | Memory Retrieval Snapshot interface with 12 public fields or methods. |
MemorySearchFilterV2 | interface | interface MemorySearchFilterV2 extends MemorySearchFilter | Memory Search Filter V2 interface with 25 public fields or methods. |
NormalizedMemoryQuery | interface | interface NormalizedMemoryQuery | Normalized Memory Query interface with 12 public fields or methods. |
MemoryCandidateGeneratorType | type | type MemoryCandidateGeneratorType = 'structured' | 'keyword' | 'dense' | 'sparse' | 'graph' | 'recent' | 'custom' | Public type alias for Memory Candidate Generator Type; the declaration contains its complete type expression. |
DefaultMemoryRetrievalPipeline
Default Memory Retrieval Pipeline class with 3 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { DefaultMemoryRetrievalPipeline } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export declare class DefaultMemoryRetrievalPipeline implements MemoryRetrievalPipeline {
constructor(options: DefaultMemoryRetrievalPipelineOptions);
retrieve(request: MemoryRetrievalRequest): Promise<MemoryRetrievalResult>;
explain(snapshotId: string): Promise<MemoryRetrievalResult | null>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: DefaultMemoryRetrievalPipelineOptions): DefaultMemoryRetrievalPipeline | Creates an instance of this class. |
explain | method | explain(snapshotId: string): Promise<MemoryRetrievalResult | null> | Public method; parameters and return type are shown in the signature. |
retrieve | method | retrieve(request: MemoryRetrievalRequest): Promise<MemoryRetrievalResult> | Public method; parameters and return type are shown in the signature. |
DenseMemoryCandidateGenerator
Generates scope-fenced dense candidates from the configured vector projection.
- Kind: class
- Import:
import { DenseMemoryCandidateGenerator } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export declare class DenseMemoryCandidateGenerator implements MemoryCandidateGenerator {
readonly id: string;
readonly type: "dense";
constructor(options: DenseMemoryCandidateGeneratorOptions);
generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: DenseMemoryCandidateGeneratorOptions): DenseMemoryCandidateGenerator | Creates an instance of this class. |
generate | method | generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]> | Public method; parameters and return type are shown in the signature. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | readonly type: "dense" | Public property; its type, readonly modifier and optionality are shown in the signature. |
KeywordMemoryCandidateGenerator
Keyword Memory Candidate Generator class with 4 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { KeywordMemoryCandidateGenerator } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export declare class KeywordMemoryCandidateGenerator implements MemoryCandidateGenerator {
readonly id = "memory.generator.keyword";
readonly type: "keyword";
constructor(store: ManagedMemoryRecordStore);
generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (store: ManagedMemoryRecordStore): KeywordMemoryCandidateGenerator | Creates an instance of this class. |
generate | method | generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]> | Public method; parameters and return type are shown in the signature. |
id | property | readonly id: "memory.generator.keyword" | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | readonly type: "keyword" | Public property; its type, readonly modifier and optionality are shown in the signature. |
StructuredMemoryCandidateGenerator
Structured Memory Candidate Generator class with 4 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { StructuredMemoryCandidateGenerator } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export declare class StructuredMemoryCandidateGenerator implements MemoryCandidateGenerator {
readonly id = "memory.generator.structured";
readonly type: "structured";
constructor(store: ManagedMemoryRecordStore);
generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (store: ManagedMemoryRecordStore): StructuredMemoryCandidateGenerator | Creates an instance of this class. |
generate | method | generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]> | Public method; parameters and return type are shown in the signature. |
id | property | readonly id: "memory.generator.structured" | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | readonly type: "structured" | Public property; its type, readonly modifier and optionality are shown in the signature. |
normalizeMemoryQuery
Normalize Memory Query function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { normalizeMemoryQuery } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export declare function normalizeMemoryQuery(input: Omit<NormalizedMemoryQuery, 'queryHash'>): NormalizedMemoryQuery;Call signature
normalizeMemoryQuery(input: Omit<NormalizedMemoryQuery, "queryHash">): NormalizedMemoryQueryParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | Omit<NormalizedMemoryQuery, "queryHash"> | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
NormalizedMemoryQuery - Description: The return contract is defined by the type shown above.
DefaultMemoryRetrievalPipelineOptions
Default Memory Retrieval Pipeline Options interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { DefaultMemoryRetrievalPipelineOptions } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface DefaultMemoryRetrievalPipelineOptions {
recordStore: ManagedMemoryRecordStore;
generators: MemoryCandidateGenerator[];
rankingPolicy: MemoryRankingPolicySpecV2;
now?: () => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
generators | property | generators: MemoryCandidateGenerator[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
rankingPolicy | property | rankingPolicy: MemoryRankingPolicySpecV2 | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordStore | property | recordStore: ManagedMemoryRecordStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
DenseMemoryCandidateGeneratorOptions
Dense Memory Candidate Generator Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { DenseMemoryCandidateGeneratorOptions } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface DenseMemoryCandidateGeneratorOptions {
store: ManagedVectorStoreAdapter;
embeddings: EmbeddingProvider;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
embeddings | property | embeddings: EmbeddingProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
store | property | store: ManagedVectorStoreAdapter | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryCandidate
Memory Candidate interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryCandidate } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryCandidate {
memoryId: string;
generatorId: string;
generatorType?: MemoryCandidateGeneratorType;
rawScore?: number;
normalizedScore?: number;
matchedFields?: string[];
matchedFragments?: MemoryMatchedFragment[];
reasons?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
generatorId | property | generatorId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
generatorType | property | generatorType?: MemoryCandidateGeneratorType | Public property; its type, readonly modifier and optionality are shown in the signature. |
matchedFields | property | matchedFields?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
matchedFragments | property | matchedFragments?: MemoryMatchedFragment[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryId | property | memoryId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
normalizedScore | property | normalizedScore?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
rawScore | property | rawScore?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
reasons | property | reasons?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryCandidateGenerationRequest
Memory Candidate Generation Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryCandidateGenerationRequest } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryCandidateGenerationRequest {
query: NormalizedMemoryQuery;
filter?: MemorySearchFilterV2;
limit: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
filter | property | filter?: MemorySearchFilterV2 | 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. |
query | property | query: NormalizedMemoryQuery | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryCandidateGenerator
Memory Candidate Generator interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryCandidateGenerator } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryCandidateGenerator {
readonly id: string;
readonly type: MemoryCandidateGeneratorType;
generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
generate | method | generate(request: MemoryCandidateGenerationRequest): Promise<MemoryCandidate[]> | Public method; parameters and return type are shown in the signature. |
id | property | readonly id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | readonly type: MemoryCandidateGeneratorType | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryMatchedFragment
Memory Matched Fragment interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { MemoryMatchedFragment } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryMatchedFragment {
field: string;
text?: string;
start?: number;
end?: number;
fragmentHash?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
end | property | end?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
field | property | field: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fragmentHash | property | fragmentHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
start | property | start?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
text | property | text?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRankingPolicySpecV2
Memory Ranking Policy Spec V2 interface with 19 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRankingPolicySpecV2 } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryRankingPolicySpecV2 extends MemoryRetrievalPolicySpec {
normalization: 'min_max' | 'z_score' | 'rank' | 'provider_normalized';
weights: {
semantic?: number;
keyword?: number;
exact?: number;
graph?: number;
recency?: number;
importance?: number;
confidence?: number;
authority?: number;
verified?: number;
reinforcement?: number;
};
freshnessHalfLifeSeconds?: number;
diversity?: {
method: 'none' | 'mmr' | 'per_entity_cap' | 'per_source_cap';
lambda?: number;
maxPerEntity?: number;
maxPerSource?: number;
};
stableTieBreak: 'memory_id' | 'updated_at_then_id' | 'created_at_then_id';
}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. |
diversity | property | diversity?: { method: "none" | "mmr" | "per_entity_cap" | "per_source_cap"; lambda?: number; maxPerEntity?: number; maxPerSource?: number; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
freshnessHalfLifeSeconds | property | freshnessHalfLifeSeconds?: 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. |
normalization | property | normalization: "min_max" | "z_score" | "rank" | "provider_normalized" | 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. |
stableTieBreak | property | stableTieBreak: "memory_id" | "updated_at_then_id" | "created_at_then_id" | Public property; its type, readonly modifier and optionality are shown in the signature. |
weights | property | weights: { semantic?: number; keyword?: number; exact?: number; graph?: number; recency?: number; importance?: number; confidence?: number; authority?: number; verified?: number; reinforcement?: number; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRetrievalExplanation
Memory Retrieval Explanation interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetrievalExplanation } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryRetrievalExplanation {
memoryId: string;
finalRank: number;
finalScore: number;
componentScores: Record<string, number>;
filtersPassed: string[];
filtersRejected?: string[];
selectedBecause: string[];
conflictMarkers?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
componentScores | property | componentScores: Record<string, number> | Public property; its type, readonly modifier and optionality are shown in the signature. |
conflictMarkers | property | conflictMarkers?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
filtersPassed | property | filtersPassed: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
filtersRejected | property | filtersRejected?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalRank | property | finalRank: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalScore | property | finalScore: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryId | property | memoryId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
selectedBecause | property | selectedBecause: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRetrievalPipeline
Memory Retrieval Pipeline interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetrievalPipeline } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryRetrievalPipeline {
retrieve(request: MemoryRetrievalRequest): Promise<MemoryRetrievalResult>;
explain(snapshotId: string): Promise<MemoryRetrievalResult | null>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
explain | method | explain(snapshotId: string): Promise<MemoryRetrievalResult | null> | Public method; parameters and return type are shown in the signature. |
retrieve | method | retrieve(request: MemoryRetrievalRequest): Promise<MemoryRetrievalResult> | Public method; parameters and return type are shown in the signature. |
MemoryRetrievalRequest
Memory Retrieval Request interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetrievalRequest } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryRetrievalRequest {
query: NormalizedMemoryQuery;
profileRef: MemoryContractSpecRef;
filter?: MemorySearchFilterV2;
topK: number;
scoreThreshold?: number;
includeSuperseded?: boolean;
includeInvalidated?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
filter | property | filter?: MemorySearchFilterV2 | Public property; its type, readonly modifier and optionality are shown in the signature. |
includeInvalidated | property | includeInvalidated?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
includeSuperseded | property | includeSuperseded?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRef | property | profileRef: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
query | property | query: NormalizedMemoryQuery | 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. |
topK | property | topK: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRetrievalResult
Memory Retrieval Result interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetrievalResult } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryRetrievalResult {
results: ManagedMemorySearchResult[];
snapshot: MemoryRetrievalSnapshot;
explanations: MemoryRetrievalExplanation[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
explanations | property | explanations: MemoryRetrievalExplanation[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
results | property | results: ManagedMemorySearchResult[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
snapshot | property | snapshot: MemoryRetrievalSnapshot | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryRetrievalSnapshot
Memory Retrieval Snapshot interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { MemoryRetrievalSnapshot } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemoryRetrievalSnapshot {
id: string;
operationId: string;
queryHash: string;
profileRef: MemoryContractSpecRef;
profileRevision: string;
filterHash: string;
generatorIds: string[];
candidateCount: number;
rankingPolicyHash: string;
rerankerRef?: MemoryContractSpecRef;
resultMemoryIds: string[];
createdAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
candidateCount | property | candidateCount: 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. |
filterHash | property | filterHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
generatorIds | property | generatorIds: 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. |
operationId | property | operationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRef | property | profileRef: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRevision | property | profileRevision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
queryHash | property | queryHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
rankingPolicyHash | property | rankingPolicyHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
rerankerRef | property | rerankerRef?: MemoryContractSpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
resultMemoryIds | property | resultMemoryIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemorySearchFilterV2
Memory Search Filter V2 interface with 25 public fields or methods.
- Kind: interface
- Import:
import type { MemorySearchFilterV2 } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface MemorySearchFilterV2 extends MemorySearchFilter {
excludeTags?: string[];
authorities?: NonNullable<MemoryExtractionSourceRef['authority']>[];
validAt?: string;
validFromBefore?: string;
validToAfter?: string;
relationTypes?: MemoryRelation['type'][];
legalHoldOnly?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
authorities | property | authorities?: NonNullable<"verified" | "unverified" | "user_asserted" | "system_observed" | "authoritative">[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
canonicalKeys | property | canonicalKeys?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
confidenceGte | property | confidenceGte?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
conflictFreeOnly | property | conflictFreeOnly?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAfter | property | createdAfter?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdBefore | property | createdBefore?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
entityIds | property | entityIds?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
excludeIds | property | excludeIds?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
excludeTags | property | excludeTags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAfter | property | expiresAfter?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ids | property | ids?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
importanceGte | property | importanceGte?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
legalHoldOnly | property | legalHoldOnly?: boolean | 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. |
relationTypes | property | relationTypes?: ("supports" | "contradicts" | "supersedes" | "derived_from" | "related_to" | "same_as" | "part_of")[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceTypes | property | sourceTypes?: ("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. |
statuses | property | statuses?: MemoryStatus[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tagsAll | property | tagsAll?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tagsAny | property | tagsAny?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAfter | property | updatedAfter?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
validAt | property | validAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
validFromBefore | property | validFromBefore?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
validToAfter | property | validToAfter?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
verifiedOnly | property | verifiedOnly?: boolean | 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. |
NormalizedMemoryQuery
Normalized Memory Query interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { NormalizedMemoryQuery } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export interface NormalizedMemoryQuery {
operationId: string;
scope: ManagedMemoryScope;
principal: MemoryPrincipal;
rawQuery?: string;
normalizedQuery?: string;
queryEmbedding?: number[];
entities?: MemoryEntityRef[];
temporalIntent?: {
at?: string;
from?: string;
to?: string;
};
requestedTypes?: ManagedMemoryType[];
mode?: 'structured' | 'semantic' | 'keyword' | 'hybrid' | 'graph';
profileRevision: string;
queryHash: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
entities | property | entities?: MemoryEntityRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode?: "structured" | "hybrid" | "semantic" | "keyword" | "graph" | Public property; its type, readonly modifier and optionality are shown in the signature. |
normalizedQuery | property | normalizedQuery?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationId | property | operationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
principal | property | principal: MemoryPrincipal | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRevision | property | profileRevision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
queryEmbedding | property | queryEmbedding?: number[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
queryHash | property | queryHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
rawQuery | property | rawQuery?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requestedTypes | property | requestedTypes?: ManagedMemoryType[] | 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. |
temporalIntent | property | temporalIntent?: { at?: string; from?: string; to?: string; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryCandidateGeneratorType
Public type alias for Memory Candidate Generator Type; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MemoryCandidateGeneratorType } from '@codesoul-co/hypha-memory'; - Source module:
retrieval
Declaration
export type MemoryCandidateGeneratorType = 'structured' | 'keyword' | 'dense' | 'sparse' | 'graph' | 'recent' | 'custom';