@anuma/sdk 6.19.2 → 6.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5841,7 +5841,25 @@ type RecallDegradation =
5841
5841
  * failing back to the single-query path, or a row batch failing while other
5842
5842
  * rows keep usable vectors) — those are logged, not reported, so this stays a
5843
5843
  * reliable outage signal rather than a general embedding-error counter. */
5844
- | "embeddings-unavailable";
5844
+ | "embeddings-unavailable"
5845
+ /** The W5 graph (entity) side lane threw and was dropped. Auxiliary, so recall
5846
+ * still returned — but its RRF signal is missing from the ranking, and until
5847
+ * this existed the drop was a log line and nothing else. */
5848
+ | "graph-lane-failed"
5849
+ /** The W6 temporal side lane threw and was dropped. Same posture as the graph
5850
+ * lane: recall still returned, ranked without the temporal signal. */
5851
+ | "temporal-lane-failed";
5852
+ /**
5853
+ * Why a recall returned nothing. `""` when it returned something, so the field
5854
+ * is always present and groupable rather than being absent on the healthy path.
5855
+ *
5856
+ * The four are different problems: an empty query is a caller bug, no-lanes is a
5857
+ * context wiring bug (the requested kinds have no store), vault-empty is a new
5858
+ * user, and no-candidates is the only one that is about retrieval quality. They
5859
+ * were previously indistinguishable from outside — every one reported
5860
+ * `candidateCount: 0`.
5861
+ */
5862
+ type RecallEmptyReason = "" | "empty-query" | "no-lanes" | "vault-empty" | "no-candidates";
5845
5863
  /**
5846
5864
  * Per-call recall observability payload (see {@link RecallOptions.onDiagnostics}).
5847
5865
  * All timings are wall-clock milliseconds. Lane counts are post-dedupe,
@@ -5892,6 +5910,50 @@ interface RecallDiagnostics {
5892
5910
  factCount: number;
5893
5911
  /** Chunks the chunk lane returned (post-dedupe, pre-fusion). */
5894
5912
  chunkCount: number;
5913
+ /**
5914
+ * Memories actually RETURNED — `memories.length` after fusion, cross-lane
5915
+ * dedup and the `limit` slice.
5916
+ *
5917
+ * `candidateCount` is what was considered; this is what the caller got, and
5918
+ * the two are routinely far apart (the fact lane pulls `limit * 2` when fusing).
5919
+ * Every consumer that wanted "how many memories did this turn actually get"
5920
+ * was reading `candidateCount` and overcounting.
5921
+ */
5922
+ admittedCount: number;
5923
+ /** Highest score among the returned memories; -1 when none were returned. */
5924
+ topScore: number;
5925
+ /** Lowest score among the returned memories; -1 when none were returned. */
5926
+ lowestAdmittedScore: number;
5927
+ /**
5928
+ * The similarity floor the lane that produced these scores actually applied:
5929
+ * the fact lane's when it RETURNED results, otherwise the chunk lane's, and
5930
+ * **-1 when neither ran** (empty query, unwired context). Gated on results
5931
+ * rather than on the lane running, because a fact lane that ran and came
5932
+ * back empty filtered none of the scores in the payload — reporting its
5933
+ * 0.1 default against chunks that cleared 0.5 corrupted the telemetry.
5934
+ * When NOTHING was admitted, the floor a lane did apply is still reported:
5935
+ * "searched at this floor, found nothing" is the useful reading.
5936
+ *
5937
+ * Per-lane rather than one constant because the two defaults differ (0.1 fact
5938
+ * / 0.5 chunk), so a single seeded value reported a floor that a chunk-only
5939
+ * recall never applied. Reported next to the scores because the scores alone
5940
+ * cannot say what they cleared.
5941
+ */
5942
+ minScoreApplied: number;
5943
+ /**
5944
+ * Whether the `limit` cut an ELIGIBLE result — recorded at the cut, not
5945
+ * derived from `candidateCount > limit`. In the fused path `candidateCount`
5946
+ * counts before provenance suppression, so a recall whose suppressed chunks
5947
+ * brought it under the limit would otherwise report a truncation that never
5948
+ * happened.
5949
+ */
5950
+ truncated: boolean;
5951
+ /** Memory ids the W5 graph (entity) side lane contributed to the fusion. */
5952
+ graphLaneCount: number;
5953
+ /** Memory ids the W6 temporal side lane contributed to the fusion. */
5954
+ temporalLaneCount: number;
5955
+ /** Why nothing came back — see {@link RecallEmptyReason}. `""` when something did. */
5956
+ emptyReason: RecallEmptyReason;
5895
5957
  /** Wall-clock phase timings (ms). */
5896
5958
  timings: {
5897
5959
  /** Whole `recall()` call. */
@@ -5940,6 +6002,15 @@ interface RecallDiagnostics {
5940
6002
  degraded: RecallDegradation[];
5941
6003
  }
5942
6004
  type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
6005
+ /**
6006
+ * The consolidation LLM's decision for a candidate, when it made one. Reported
6007
+ * on {@link RetainResult.consolidation} so a host can tell an LLM `noop` (the
6008
+ * fact already exists) from a cosine auto-merge — both arrive as
6009
+ * `action: "merge"` — and can read how often the model reaches for `supersede`
6010
+ * or `update` versus `create`. A degraded fallback create (LLM error, bad
6011
+ * response) carries no decision; `onFallback` reports those.
6012
+ */
6013
+ type ConsolidationAction = "create" | "update" | "noop" | "supersede";
5943
6014
  type RetainSource = "manual" | "auto-extracted" | "capsule";
5944
6015
  /**
5945
6016
  * Why a retain returned "create" instead of applying a consolidation decision.
@@ -6079,6 +6150,33 @@ interface RetainResult {
6079
6150
  tombstoneId?: string;
6080
6151
  /** Updated proof_count after this write. 0 when nothing was written (suppressed). */
6081
6152
  proofCount: number;
6153
+ /**
6154
+ * How close the write was to the threshold that allowed it. Absent on the
6155
+ * actions that have no such score (`create`, `update`, `supersede`, `skip`).
6156
+ *
6157
+ * The two paths report DIFFERENT things and a dashboard has to know which:
6158
+ *
6159
+ * - `suppressed` — an exact cosine against the tombstone, computed in
6160
+ * `findTombstoneMatch`.
6161
+ * - `merge` — the RANKER's score for the target, not a pure cosine. The
6162
+ * cosine is what cleared `minSimilarity`, but the supersession pass may
6163
+ * then adjust it (`oldScore - delta` / `newScore + delta`) before this
6164
+ * value is read, and can in principle reorder the winner. Read it as
6165
+ * "the score the merge was chosen on", within the supersession delta of
6166
+ * the cosine — not as the raw pairwise similarity.
6167
+ */
6168
+ similarity?: number;
6169
+ /**
6170
+ * What the consolidation LLM decided for this candidate, when consolidation
6171
+ * ran — see {@link ConsolidationAction}.
6172
+ *
6173
+ * Reported for the DECISION, not for what the write ended up doing, so the
6174
+ * two can disagree and be read as such: a `merge` carrying
6175
+ * `consolidation: "create"` is the model saying "new fact" and the strict
6176
+ * cosine stage merging anyway. Absent when consolidation did not run, and
6177
+ * absent on a degraded fallback create (`onFallback` owns that signal).
6178
+ */
6179
+ consolidation?: ConsolidationAction;
6082
6180
  }
6083
6181
 
6084
6182
  /**
@@ -6305,6 +6403,61 @@ interface ExtractFactsOptions extends PortalLlmAuth {
6305
6403
  * callers may leave it unset.
6306
6404
  */
6307
6405
  onAttempt?: (attempt: PortalLlmAttempt) => void;
6406
+ /**
6407
+ * Fired once per successful completion with how many candidates the model
6408
+ * emitted (`rawCount`) and how many survived {@link validateCandidates}
6409
+ * (`validCount`) — the non-string / empty / over-cap / low-signal / bad-
6410
+ * confidence drops that until now were a bare `continue` nobody counted.
6411
+ *
6412
+ * Without it a `no-facts` turn cannot be split into "the model found nothing"
6413
+ * and "the model found things we threw away", which is the difference between
6414
+ * a prompt problem and a validator problem. Counts only; never content.
6415
+ */
6416
+ onCandidatesParsed?: (stats: {
6417
+ rawCount: number;
6418
+ validCount: number;
6419
+ }) => void;
6420
+ }
6421
+ /**
6422
+ * Where a turn's candidates went between the model's completion and the vault —
6423
+ * every stage that can drop one, as a count. Returned by {@link extractAndRetain}
6424
+ * and forwarded on `TurnCompleteEvent` so a host can emit it; nothing here is
6425
+ * content.
6426
+ *
6427
+ * Reads as a funnel: `raw ≥ valid ≥ afterRedaction ≥ aboveConfidence`, then
6428
+ * `aboveConfidence = quarantined + retained + failed`.
6429
+ * @public
6430
+ */
6431
+ interface ExtractionFunnel {
6432
+ /** Candidates in the model's completion, before any validation. */
6433
+ rawCandidateCount: number;
6434
+ /** Survivors of {@link validateCandidates} (shape, length, low-signal, confidence-is-a-number). */
6435
+ validCandidateCount: number;
6436
+ /** Survivors of PII de-anonymization (equals `validCandidateCount` when redaction is off). */
6437
+ afterRedactionCount: number;
6438
+ /** Survivors of the `minConfidence` floor — the candidates that reached the injection screen. */
6439
+ aboveConfidenceCount: number;
6440
+ /**
6441
+ * Held for review by the injection screen and SUCCESSFULLY persisted — the
6442
+ * same set as `extractAndRetain`'s `quarantined`. A screened candidate whose
6443
+ * `retain()` threw is in `failedCount` instead, never both.
6444
+ */
6445
+ quarantinedCount: number;
6446
+ /** Written through `retain()` (any disposition). */
6447
+ retainedCount: number;
6448
+ /** `retain()` threw. */
6449
+ failedCount: number;
6450
+ }
6451
+ /**
6452
+ * Wall-clock split of one {@link extractAndRetain} call. The worker's
6453
+ * `durationMs` is the sum plus the screen; these say which half is slow.
6454
+ * @public
6455
+ */
6456
+ interface ExtractionTimings {
6457
+ /** The extraction LLM call, all attempts and backoff included. */
6458
+ extractMs: number;
6459
+ /** The retain loop — embeddings, consolidation LLM calls, writes — over every candidate. */
6460
+ retainMs: number;
6308
6461
  }
6309
6462
  /**
6310
6463
  * Stage 1 — call the LLM to extract candidate facts from the recent
@@ -6422,6 +6575,12 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
6422
6575
  * the give-up, so "extraction is failing" can be reported as *why* it failed.
6423
6576
  */
6424
6577
  failure?: PortalLlmFailure;
6578
+ /** Where the candidates went, stage by stage — see {@link ExtractionFunnel}. */
6579
+ funnel: ExtractionFunnel;
6580
+ /** Extract vs. retain wall-clock — see {@link ExtractionTimings}. */
6581
+ timings: ExtractionTimings;
6582
+ /** The extraction model this call asked for (the resolved default when unset). */
6583
+ model: string;
6425
6584
  }>;
6426
6585
 
6427
6586
  /**
@@ -7485,6 +7644,16 @@ interface TurnCompleteEvent {
7485
7644
  * carries content.
7486
7645
  */
7487
7646
  failure?: PortalLlmFailure;
7647
+ /**
7648
+ * Where the candidates went between the model and the vault, as counts — the
7649
+ * drops before `retain()` that `candidates`/`results` cannot show. See
7650
+ * {@link ExtractionFunnel}.
7651
+ */
7652
+ funnel?: ExtractionFunnel;
7653
+ /** Extract vs. retain wall-clock split of `durationMs`. See {@link ExtractionTimings}. */
7654
+ timings?: ExtractionTimings;
7655
+ /** The extraction model this turn asked for. */
7656
+ model?: string;
7488
7657
  }
7489
7658
  /** @public */
7490
7659
  /**
@@ -10753,4 +10922,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
10753
10922
  */
10754
10923
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
10755
10924
 
10756
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
10925
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
@@ -5841,7 +5841,25 @@ type RecallDegradation =
5841
5841
  * failing back to the single-query path, or a row batch failing while other
5842
5842
  * rows keep usable vectors) — those are logged, not reported, so this stays a
5843
5843
  * reliable outage signal rather than a general embedding-error counter. */
5844
- | "embeddings-unavailable";
5844
+ | "embeddings-unavailable"
5845
+ /** The W5 graph (entity) side lane threw and was dropped. Auxiliary, so recall
5846
+ * still returned — but its RRF signal is missing from the ranking, and until
5847
+ * this existed the drop was a log line and nothing else. */
5848
+ | "graph-lane-failed"
5849
+ /** The W6 temporal side lane threw and was dropped. Same posture as the graph
5850
+ * lane: recall still returned, ranked without the temporal signal. */
5851
+ | "temporal-lane-failed";
5852
+ /**
5853
+ * Why a recall returned nothing. `""` when it returned something, so the field
5854
+ * is always present and groupable rather than being absent on the healthy path.
5855
+ *
5856
+ * The four are different problems: an empty query is a caller bug, no-lanes is a
5857
+ * context wiring bug (the requested kinds have no store), vault-empty is a new
5858
+ * user, and no-candidates is the only one that is about retrieval quality. They
5859
+ * were previously indistinguishable from outside — every one reported
5860
+ * `candidateCount: 0`.
5861
+ */
5862
+ type RecallEmptyReason = "" | "empty-query" | "no-lanes" | "vault-empty" | "no-candidates";
5845
5863
  /**
5846
5864
  * Per-call recall observability payload (see {@link RecallOptions.onDiagnostics}).
5847
5865
  * All timings are wall-clock milliseconds. Lane counts are post-dedupe,
@@ -5892,6 +5910,50 @@ interface RecallDiagnostics {
5892
5910
  factCount: number;
5893
5911
  /** Chunks the chunk lane returned (post-dedupe, pre-fusion). */
5894
5912
  chunkCount: number;
5913
+ /**
5914
+ * Memories actually RETURNED — `memories.length` after fusion, cross-lane
5915
+ * dedup and the `limit` slice.
5916
+ *
5917
+ * `candidateCount` is what was considered; this is what the caller got, and
5918
+ * the two are routinely far apart (the fact lane pulls `limit * 2` when fusing).
5919
+ * Every consumer that wanted "how many memories did this turn actually get"
5920
+ * was reading `candidateCount` and overcounting.
5921
+ */
5922
+ admittedCount: number;
5923
+ /** Highest score among the returned memories; -1 when none were returned. */
5924
+ topScore: number;
5925
+ /** Lowest score among the returned memories; -1 when none were returned. */
5926
+ lowestAdmittedScore: number;
5927
+ /**
5928
+ * The similarity floor the lane that produced these scores actually applied:
5929
+ * the fact lane's when it RETURNED results, otherwise the chunk lane's, and
5930
+ * **-1 when neither ran** (empty query, unwired context). Gated on results
5931
+ * rather than on the lane running, because a fact lane that ran and came
5932
+ * back empty filtered none of the scores in the payload — reporting its
5933
+ * 0.1 default against chunks that cleared 0.5 corrupted the telemetry.
5934
+ * When NOTHING was admitted, the floor a lane did apply is still reported:
5935
+ * "searched at this floor, found nothing" is the useful reading.
5936
+ *
5937
+ * Per-lane rather than one constant because the two defaults differ (0.1 fact
5938
+ * / 0.5 chunk), so a single seeded value reported a floor that a chunk-only
5939
+ * recall never applied. Reported next to the scores because the scores alone
5940
+ * cannot say what they cleared.
5941
+ */
5942
+ minScoreApplied: number;
5943
+ /**
5944
+ * Whether the `limit` cut an ELIGIBLE result — recorded at the cut, not
5945
+ * derived from `candidateCount > limit`. In the fused path `candidateCount`
5946
+ * counts before provenance suppression, so a recall whose suppressed chunks
5947
+ * brought it under the limit would otherwise report a truncation that never
5948
+ * happened.
5949
+ */
5950
+ truncated: boolean;
5951
+ /** Memory ids the W5 graph (entity) side lane contributed to the fusion. */
5952
+ graphLaneCount: number;
5953
+ /** Memory ids the W6 temporal side lane contributed to the fusion. */
5954
+ temporalLaneCount: number;
5955
+ /** Why nothing came back — see {@link RecallEmptyReason}. `""` when something did. */
5956
+ emptyReason: RecallEmptyReason;
5895
5957
  /** Wall-clock phase timings (ms). */
5896
5958
  timings: {
5897
5959
  /** Whole `recall()` call. */
@@ -5940,6 +6002,15 @@ interface RecallDiagnostics {
5940
6002
  degraded: RecallDegradation[];
5941
6003
  }
5942
6004
  type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
6005
+ /**
6006
+ * The consolidation LLM's decision for a candidate, when it made one. Reported
6007
+ * on {@link RetainResult.consolidation} so a host can tell an LLM `noop` (the
6008
+ * fact already exists) from a cosine auto-merge — both arrive as
6009
+ * `action: "merge"` — and can read how often the model reaches for `supersede`
6010
+ * or `update` versus `create`. A degraded fallback create (LLM error, bad
6011
+ * response) carries no decision; `onFallback` reports those.
6012
+ */
6013
+ type ConsolidationAction = "create" | "update" | "noop" | "supersede";
5943
6014
  type RetainSource = "manual" | "auto-extracted" | "capsule";
5944
6015
  /**
5945
6016
  * Why a retain returned "create" instead of applying a consolidation decision.
@@ -6079,6 +6150,33 @@ interface RetainResult {
6079
6150
  tombstoneId?: string;
6080
6151
  /** Updated proof_count after this write. 0 when nothing was written (suppressed). */
6081
6152
  proofCount: number;
6153
+ /**
6154
+ * How close the write was to the threshold that allowed it. Absent on the
6155
+ * actions that have no such score (`create`, `update`, `supersede`, `skip`).
6156
+ *
6157
+ * The two paths report DIFFERENT things and a dashboard has to know which:
6158
+ *
6159
+ * - `suppressed` — an exact cosine against the tombstone, computed in
6160
+ * `findTombstoneMatch`.
6161
+ * - `merge` — the RANKER's score for the target, not a pure cosine. The
6162
+ * cosine is what cleared `minSimilarity`, but the supersession pass may
6163
+ * then adjust it (`oldScore - delta` / `newScore + delta`) before this
6164
+ * value is read, and can in principle reorder the winner. Read it as
6165
+ * "the score the merge was chosen on", within the supersession delta of
6166
+ * the cosine — not as the raw pairwise similarity.
6167
+ */
6168
+ similarity?: number;
6169
+ /**
6170
+ * What the consolidation LLM decided for this candidate, when consolidation
6171
+ * ran — see {@link ConsolidationAction}.
6172
+ *
6173
+ * Reported for the DECISION, not for what the write ended up doing, so the
6174
+ * two can disagree and be read as such: a `merge` carrying
6175
+ * `consolidation: "create"` is the model saying "new fact" and the strict
6176
+ * cosine stage merging anyway. Absent when consolidation did not run, and
6177
+ * absent on a degraded fallback create (`onFallback` owns that signal).
6178
+ */
6179
+ consolidation?: ConsolidationAction;
6082
6180
  }
6083
6181
 
6084
6182
  /**
@@ -6305,6 +6403,61 @@ interface ExtractFactsOptions extends PortalLlmAuth {
6305
6403
  * callers may leave it unset.
6306
6404
  */
6307
6405
  onAttempt?: (attempt: PortalLlmAttempt) => void;
6406
+ /**
6407
+ * Fired once per successful completion with how many candidates the model
6408
+ * emitted (`rawCount`) and how many survived {@link validateCandidates}
6409
+ * (`validCount`) — the non-string / empty / over-cap / low-signal / bad-
6410
+ * confidence drops that until now were a bare `continue` nobody counted.
6411
+ *
6412
+ * Without it a `no-facts` turn cannot be split into "the model found nothing"
6413
+ * and "the model found things we threw away", which is the difference between
6414
+ * a prompt problem and a validator problem. Counts only; never content.
6415
+ */
6416
+ onCandidatesParsed?: (stats: {
6417
+ rawCount: number;
6418
+ validCount: number;
6419
+ }) => void;
6420
+ }
6421
+ /**
6422
+ * Where a turn's candidates went between the model's completion and the vault —
6423
+ * every stage that can drop one, as a count. Returned by {@link extractAndRetain}
6424
+ * and forwarded on `TurnCompleteEvent` so a host can emit it; nothing here is
6425
+ * content.
6426
+ *
6427
+ * Reads as a funnel: `raw ≥ valid ≥ afterRedaction ≥ aboveConfidence`, then
6428
+ * `aboveConfidence = quarantined + retained + failed`.
6429
+ * @public
6430
+ */
6431
+ interface ExtractionFunnel {
6432
+ /** Candidates in the model's completion, before any validation. */
6433
+ rawCandidateCount: number;
6434
+ /** Survivors of {@link validateCandidates} (shape, length, low-signal, confidence-is-a-number). */
6435
+ validCandidateCount: number;
6436
+ /** Survivors of PII de-anonymization (equals `validCandidateCount` when redaction is off). */
6437
+ afterRedactionCount: number;
6438
+ /** Survivors of the `minConfidence` floor — the candidates that reached the injection screen. */
6439
+ aboveConfidenceCount: number;
6440
+ /**
6441
+ * Held for review by the injection screen and SUCCESSFULLY persisted — the
6442
+ * same set as `extractAndRetain`'s `quarantined`. A screened candidate whose
6443
+ * `retain()` threw is in `failedCount` instead, never both.
6444
+ */
6445
+ quarantinedCount: number;
6446
+ /** Written through `retain()` (any disposition). */
6447
+ retainedCount: number;
6448
+ /** `retain()` threw. */
6449
+ failedCount: number;
6450
+ }
6451
+ /**
6452
+ * Wall-clock split of one {@link extractAndRetain} call. The worker's
6453
+ * `durationMs` is the sum plus the screen; these say which half is slow.
6454
+ * @public
6455
+ */
6456
+ interface ExtractionTimings {
6457
+ /** The extraction LLM call, all attempts and backoff included. */
6458
+ extractMs: number;
6459
+ /** The retain loop — embeddings, consolidation LLM calls, writes — over every candidate. */
6460
+ retainMs: number;
6308
6461
  }
6309
6462
  /**
6310
6463
  * Stage 1 — call the LLM to extract candidate facts from the recent
@@ -6422,6 +6575,12 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
6422
6575
  * the give-up, so "extraction is failing" can be reported as *why* it failed.
6423
6576
  */
6424
6577
  failure?: PortalLlmFailure;
6578
+ /** Where the candidates went, stage by stage — see {@link ExtractionFunnel}. */
6579
+ funnel: ExtractionFunnel;
6580
+ /** Extract vs. retain wall-clock — see {@link ExtractionTimings}. */
6581
+ timings: ExtractionTimings;
6582
+ /** The extraction model this call asked for (the resolved default when unset). */
6583
+ model: string;
6425
6584
  }>;
6426
6585
 
6427
6586
  /**
@@ -7485,6 +7644,16 @@ interface TurnCompleteEvent {
7485
7644
  * carries content.
7486
7645
  */
7487
7646
  failure?: PortalLlmFailure;
7647
+ /**
7648
+ * Where the candidates went between the model and the vault, as counts — the
7649
+ * drops before `retain()` that `candidates`/`results` cannot show. See
7650
+ * {@link ExtractionFunnel}.
7651
+ */
7652
+ funnel?: ExtractionFunnel;
7653
+ /** Extract vs. retain wall-clock split of `durationMs`. See {@link ExtractionTimings}. */
7654
+ timings?: ExtractionTimings;
7655
+ /** The extraction model this turn asked for. */
7656
+ model?: string;
7488
7657
  }
7489
7658
  /** @public */
7490
7659
  /**
@@ -10753,4 +10922,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
10753
10922
  */
10754
10923
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
10755
10924
 
10756
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
10925
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };