@anuma/sdk 6.43.0 → 6.43.1

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.
@@ -1394,6 +1394,51 @@ type LlmapiChatCompletionResponse = Omit<LlmapiChatCompletionResponse$1, "usage"
1394
1394
  messages?: Array<LlmapiMessage>;
1395
1395
  };
1396
1396
 
1397
+ /**
1398
+ * Class-B task types — the vocabulary of the `X-Anuma-Task-Type` header.
1399
+ *
1400
+ * A Class-B flow has ONE fixed purpose and no conversation: extract memories
1401
+ * from a snippet, pick a topic, consolidate duplicates, classify a query. Today
1402
+ * each of those builds its own system prompt on the client and sends it as a
1403
+ * `role:system` message, which makes the prompt a suggestion rather than a
1404
+ * contract — a caller can reword it into "you are a general assistant" and get
1405
+ * general chat at internal-endpoint prices.
1406
+ *
1407
+ * The fix is that the SERVER owns the text and the client only names the task.
1408
+ * This header is the name. The portal allowlists it against its own copy of this
1409
+ * enum (ai-portal `internal/systemprompt/tasks.go`) and DROPS anything it does
1410
+ * not recognise, so an unknown value degrades to "no task declared" rather than
1411
+ * failing the request.
1412
+ *
1413
+ * ⚠ These string values are a wire contract with ai-portal. Adding one here
1414
+ * before the portal knows it is harmless (it is dropped); renaming or removing
1415
+ * one silently stops that flow being counted. Keep them in step with
1416
+ * `AllTaskTypes` on the portal side, and see ai-portal
1417
+ * `docs/BACKEND_OWNED_TASK_PROMPTS.md` for the rollout.
1418
+ *
1419
+ * ⚠ RELEASE ORDER. This union is a PUBLIC type, so a split is breaking in both
1420
+ * directions and has to be sequenced:
1421
+ *
1422
+ * 1. merge + publish this package;
1423
+ * 2. bump `@anuma/sdk` in the consumer and switch its call sites to the new
1424
+ * names in the same commit.
1425
+ *
1426
+ * A consumer on the OLD version cannot compile the new names, and a consumer on
1427
+ * the NEW version cannot compile the retired ones (`app_inspiration` is gone
1428
+ * here, replaced by the three `app_inspiration_*` names). Both halves of that
1429
+ * are type-only — the wire itself always degrades safely, because the portal
1430
+ * drops any value it does not recognise. Concretely: ai-memoryless-client#5782
1431
+ * is blocked on this publish for exactly that reason.
1432
+ *
1433
+ * Deliberately ABSENT: agent personas, `reflect()` when it answers the user, and
1434
+ * the app-idea chat. Those carry an open conversation with the user, so a fixed
1435
+ * server-owned prompt would be wrong rather than merely premature — the same
1436
+ * boundary {@link INTERNAL_FLOW_MARKER} draws.
1437
+ *
1438
+ * @public
1439
+ */
1440
+ type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "memory_recall_embed" | "memory_retain_embed" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
1441
+
1397
1442
  /**
1398
1443
  * Options for memory engine search
1399
1444
  */
@@ -1442,6 +1487,7 @@ interface MemoryEngineResult {
1442
1487
  * At least one of `getToken` or `apiKey` must be provided.
1443
1488
  */
1444
1489
  interface EmbeddingOptions {
1490
+ taskType?: TaskType;
1445
1491
  /** Function to get auth token (e.g., Privy's getIdentityToken). Uses Authorization: Bearer header. */
1446
1492
  getToken?: () => Promise<string | null>;
1447
1493
  /** Direct API key for server-side usage. Uses X-API-Key header. */
@@ -3594,51 +3640,6 @@ declare function useEncryption(signMessage: SignMessageFn, embeddedWalletSigner?
3594
3640
  */
3595
3641
  declare function isEncrypted(value: string): boolean;
3596
3642
 
3597
- /**
3598
- * Class-B task types — the vocabulary of the `X-Anuma-Task-Type` header.
3599
- *
3600
- * A Class-B flow has ONE fixed purpose and no conversation: extract memories
3601
- * from a snippet, pick a topic, consolidate duplicates, classify a query. Today
3602
- * each of those builds its own system prompt on the client and sends it as a
3603
- * `role:system` message, which makes the prompt a suggestion rather than a
3604
- * contract — a caller can reword it into "you are a general assistant" and get
3605
- * general chat at internal-endpoint prices.
3606
- *
3607
- * The fix is that the SERVER owns the text and the client only names the task.
3608
- * This header is the name. The portal allowlists it against its own copy of this
3609
- * enum (ai-portal `internal/systemprompt/tasks.go`) and DROPS anything it does
3610
- * not recognise, so an unknown value degrades to "no task declared" rather than
3611
- * failing the request.
3612
- *
3613
- * ⚠ These string values are a wire contract with ai-portal. Adding one here
3614
- * before the portal knows it is harmless (it is dropped); renaming or removing
3615
- * one silently stops that flow being counted. Keep them in step with
3616
- * `AllTaskTypes` on the portal side, and see ai-portal
3617
- * `docs/BACKEND_OWNED_TASK_PROMPTS.md` for the rollout.
3618
- *
3619
- * ⚠ RELEASE ORDER. This union is a PUBLIC type, so a split is breaking in both
3620
- * directions and has to be sequenced:
3621
- *
3622
- * 1. merge + publish this package;
3623
- * 2. bump `@anuma/sdk` in the consumer and switch its call sites to the new
3624
- * names in the same commit.
3625
- *
3626
- * A consumer on the OLD version cannot compile the new names, and a consumer on
3627
- * the NEW version cannot compile the retired ones (`app_inspiration` is gone
3628
- * here, replaced by the three `app_inspiration_*` names). Both halves of that
3629
- * are type-only — the wire itself always degrades safely, because the portal
3630
- * drops any value it does not recognise. Concretely: ai-memoryless-client#5782
3631
- * is blocked on this publish for exactly that reason.
3632
- *
3633
- * Deliberately ABSENT: agent personas, `reflect()` when it answers the user, and
3634
- * the app-idea chat. Those carry an open conversation with the user, so a fixed
3635
- * server-owned prompt would be wrong rather than merely premature — the same
3636
- * boundary {@link INTERNAL_FLOW_MARKER} draws.
3637
- *
3638
- * @public
3639
- */
3640
- type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
3641
-
3642
3643
  /**
3643
3644
  * Auth for portal LLM calls (extraction, consolidation, decomposition,
3644
3645
  * reflection). Mirrors `memoryEngine`'s `EmbeddingOptions` dual-auth:
@@ -3853,6 +3854,7 @@ type VaultEmbeddingCache = Map<string, Float32Array>;
3853
3854
  * Options for the vault search tool.
3854
3855
  */
3855
3856
  interface MemoryVaultSearchOptions {
3857
+ onCandidateCount?: (count: number) => void;
3856
3858
  /** Maximum number of results to return (default: 5) */
3857
3859
  limit?: number;
3858
3860
  /** Minimum similarity threshold below which results are discarded (default: 0.1) */
@@ -4674,6 +4676,7 @@ interface RecallDiagnostics {
4674
4676
  * happened.
4675
4677
  */
4676
4678
  truncated: boolean;
4679
+ truncatedByBudget?: boolean;
4677
4680
  /** Memory ids the W5 graph (entity) side lane contributed to the fusion. */
4678
4681
  graphLaneCount: number;
4679
4682
  /** Memory ids the W6 temporal side lane contributed to the fusion. */
@@ -4731,6 +4734,16 @@ interface RecallDiagnostics {
4731
4734
  /** Soft-degradation signals that fired this call (empty when clean). */
4732
4735
  degraded: RecallDegradation[];
4733
4736
  }
4737
+ interface RecallTruncation {
4738
+ requestedLimit: number;
4739
+ effectiveLimit: number;
4740
+ truncatedByBudget: boolean;
4741
+ }
4742
+ interface RecallTelemetryCallbacks {
4743
+ onDiagnostics?: (diagnostics: RecallDiagnostics) => void;
4744
+ onTruncated?: (truncation: RecallTruncation) => void;
4745
+ onError?: (error: Error) => void;
4746
+ }
4734
4747
  type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
4735
4748
  /**
4736
4749
  * The consolidation LLM's decision for a candidate, when it made one. Reported
@@ -6162,6 +6175,16 @@ declare function classifyDecay(m: DecayInput, now: number, policy?: Partial<Deca
6162
6175
 
6163
6176
  /** Counts from one sweep, for UI surfacing (e.g. "N memories archived"). */
6164
6177
  interface DecaySweepResult {
6178
+ ruleDriven: {
6179
+ archived: number;
6180
+ deleted: number;
6181
+ };
6182
+ classifierDriven: {
6183
+ archived: number;
6184
+ deleted: number;
6185
+ };
6186
+ classifierCalls: number;
6187
+ classifierCapHits: number;
6165
6188
  /** Rows transitioned active → archived this sweep. */
6166
6189
  archived: number;
6167
6190
  /** Rows hard-deleted (archived past the window) this sweep. */
@@ -6264,11 +6287,19 @@ interface TopicExtractionInput {
6264
6287
  id: string;
6265
6288
  content: string;
6266
6289
  }
6290
+ interface TopicExtractionBatchDiagnostics {
6291
+ memoryIds: string[];
6292
+ attempts: number;
6293
+ durationMs: number;
6294
+ unansweredCount: number;
6295
+ failure?: PortalLlmFailure;
6296
+ }
6267
6297
  /**
6268
6298
  * Options for the topic-extraction LLM call. Auth follows the portal dual
6269
6299
  * pattern — one of `apiKey` / `getToken` is required (see {@link PortalLlmAuth}).
6270
6300
  */
6271
6301
  interface TopicExtractOptions extends PortalLlmAuth {
6302
+ onBatch?: (diagnostics: TopicExtractionBatchDiagnostics) => void;
6272
6303
  baseUrl?: string;
6273
6304
  /**
6274
6305
  * Optional per-call request path override, forwarded to
@@ -6353,6 +6384,10 @@ type TopicSkipReason = "excluded" | "link-declined" | "stamp-declined" | "llm-un
6353
6384
  declare function isDegradedTopicSkip(reason: TopicSkipReason): boolean;
6354
6385
  /** Outcome of one {@link extractAndLinkEntitiesForMemoriesOp} run. */
6355
6386
  interface TopicExtractionRunResult {
6387
+ batchCount: number;
6388
+ durationMs: number;
6389
+ batches: TopicExtractionBatchDiagnostics[];
6390
+ llmFailures: Map<string, PortalLlmFailure>;
6356
6391
  /** memoryId → entities the LLM returned (post-validation, post-linking). */
6357
6392
  entitiesByMemory: Map<string, ExtractedEntity[]>;
6358
6393
  /** Memories stamped `topics_extracted_at` this run — includes zero-entity
@@ -9284,7 +9319,7 @@ interface RecallToolOptions {
9284
9319
  * against wall-clock today, which is wrong for any historical dataset. */
9285
9320
  now?: number;
9286
9321
  }
9287
- interface RecallToolCallbacks {
9322
+ interface RecallToolCallbacks extends RecallTelemetryCallbacks {
9288
9323
  /** Called with the conversation IDs returned via the chunk lane. */
9289
9324
  onChunksRetrieved?: (conversationIds: string[]) => void;
9290
9325
  /** Called with the fact IDs returned via the fact lane. */
@@ -10556,7 +10591,7 @@ declare function decodeChunkVector(vector: number[] | string | null | undefined,
10556
10591
  * @param searchOptions - Optional search configuration
10557
10592
  * @returns A ToolConfig that can be passed to chat completion tools
10558
10593
  */
10559
- declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext | MemoryStore, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): ToolConfig;
10594
+ declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext | MemoryStore, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions, callbacks?: RecallTelemetryCallbacks): ToolConfig;
10560
10595
 
10561
10596
  declare const MANUAL_FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "other"];
10562
10597
  /** A FactType the save tool's optional `type` argument may carry. */
@@ -10972,6 +11007,7 @@ type UseChatResult = BaseUseChatResult & {
10972
11007
  * off, or no inference id had been issued yet). Pair with `resumeStream`.
10973
11008
  */
10974
11009
  detach: () => StreamResumeHandle | null;
11010
+ cancel: (handle: StreamResumeHandle) => void;
10975
11011
  /**
10976
11012
  * Replay a detached stream from the portal's buffer (GET from seq 0, fresh
10977
11013
  * accumulator). Thin hook wrapper over the library `resumeStream` — supplies
@@ -11176,9 +11212,6 @@ type SendMessageWithStorageArgs = BaseSendMessageWithStorageArgs & {
11176
11212
  * Detached variant of the storage send result.
11177
11213
  *
11178
11214
  * Returned only when `resumable` is on and the stream was torn down via
11179
- * `detach()` before completing. The partial assistant row is already persisted
11180
- * (under `assistantUniqueId`); call `resumeStream` with `handle` +
11181
- * `assistantUniqueId` to complete that SAME row.
11182
11215
  */
11183
11216
  interface SendMessageWithStorageDetachedResult {
11184
11217
  data: ApiResponse | null;
@@ -11187,9 +11220,6 @@ interface SendMessageWithStorageDetachedResult {
11187
11220
  /** Pass to `resumeStream` to replay; null when nothing was resumable. */
11188
11221
  resume: StreamResumeHandle | null;
11189
11222
  /**
11190
- * The id the resumed/expired/interrupted completion reconciles onto. Nothing
11191
- * is persisted on detach — the row materializes when resumeStream() (or
11192
- * stop()) finalizes the turn under this id.
11193
11223
  *
11194
11224
  * Present whenever storage is active. Absent under `skipStorage`: there is no
11195
11225
  * persisted row to reconcile, so drive `resumeStream(resume)` on the handle
@@ -11385,4 +11415,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
11385
11415
  */
11386
11416
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
11387
11417
 
11388
- 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11418
+ 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
@@ -1394,6 +1394,51 @@ type LlmapiChatCompletionResponse = Omit<LlmapiChatCompletionResponse$1, "usage"
1394
1394
  messages?: Array<LlmapiMessage>;
1395
1395
  };
1396
1396
 
1397
+ /**
1398
+ * Class-B task types — the vocabulary of the `X-Anuma-Task-Type` header.
1399
+ *
1400
+ * A Class-B flow has ONE fixed purpose and no conversation: extract memories
1401
+ * from a snippet, pick a topic, consolidate duplicates, classify a query. Today
1402
+ * each of those builds its own system prompt on the client and sends it as a
1403
+ * `role:system` message, which makes the prompt a suggestion rather than a
1404
+ * contract — a caller can reword it into "you are a general assistant" and get
1405
+ * general chat at internal-endpoint prices.
1406
+ *
1407
+ * The fix is that the SERVER owns the text and the client only names the task.
1408
+ * This header is the name. The portal allowlists it against its own copy of this
1409
+ * enum (ai-portal `internal/systemprompt/tasks.go`) and DROPS anything it does
1410
+ * not recognise, so an unknown value degrades to "no task declared" rather than
1411
+ * failing the request.
1412
+ *
1413
+ * ⚠ These string values are a wire contract with ai-portal. Adding one here
1414
+ * before the portal knows it is harmless (it is dropped); renaming or removing
1415
+ * one silently stops that flow being counted. Keep them in step with
1416
+ * `AllTaskTypes` on the portal side, and see ai-portal
1417
+ * `docs/BACKEND_OWNED_TASK_PROMPTS.md` for the rollout.
1418
+ *
1419
+ * ⚠ RELEASE ORDER. This union is a PUBLIC type, so a split is breaking in both
1420
+ * directions and has to be sequenced:
1421
+ *
1422
+ * 1. merge + publish this package;
1423
+ * 2. bump `@anuma/sdk` in the consumer and switch its call sites to the new
1424
+ * names in the same commit.
1425
+ *
1426
+ * A consumer on the OLD version cannot compile the new names, and a consumer on
1427
+ * the NEW version cannot compile the retired ones (`app_inspiration` is gone
1428
+ * here, replaced by the three `app_inspiration_*` names). Both halves of that
1429
+ * are type-only — the wire itself always degrades safely, because the portal
1430
+ * drops any value it does not recognise. Concretely: ai-memoryless-client#5782
1431
+ * is blocked on this publish for exactly that reason.
1432
+ *
1433
+ * Deliberately ABSENT: agent personas, `reflect()` when it answers the user, and
1434
+ * the app-idea chat. Those carry an open conversation with the user, so a fixed
1435
+ * server-owned prompt would be wrong rather than merely premature — the same
1436
+ * boundary {@link INTERNAL_FLOW_MARKER} draws.
1437
+ *
1438
+ * @public
1439
+ */
1440
+ type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "memory_recall_embed" | "memory_retain_embed" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
1441
+
1397
1442
  /**
1398
1443
  * Options for memory engine search
1399
1444
  */
@@ -1442,6 +1487,7 @@ interface MemoryEngineResult {
1442
1487
  * At least one of `getToken` or `apiKey` must be provided.
1443
1488
  */
1444
1489
  interface EmbeddingOptions {
1490
+ taskType?: TaskType;
1445
1491
  /** Function to get auth token (e.g., Privy's getIdentityToken). Uses Authorization: Bearer header. */
1446
1492
  getToken?: () => Promise<string | null>;
1447
1493
  /** Direct API key for server-side usage. Uses X-API-Key header. */
@@ -3594,51 +3640,6 @@ declare function useEncryption(signMessage: SignMessageFn, embeddedWalletSigner?
3594
3640
  */
3595
3641
  declare function isEncrypted(value: string): boolean;
3596
3642
 
3597
- /**
3598
- * Class-B task types — the vocabulary of the `X-Anuma-Task-Type` header.
3599
- *
3600
- * A Class-B flow has ONE fixed purpose and no conversation: extract memories
3601
- * from a snippet, pick a topic, consolidate duplicates, classify a query. Today
3602
- * each of those builds its own system prompt on the client and sends it as a
3603
- * `role:system` message, which makes the prompt a suggestion rather than a
3604
- * contract — a caller can reword it into "you are a general assistant" and get
3605
- * general chat at internal-endpoint prices.
3606
- *
3607
- * The fix is that the SERVER owns the text and the client only names the task.
3608
- * This header is the name. The portal allowlists it against its own copy of this
3609
- * enum (ai-portal `internal/systemprompt/tasks.go`) and DROPS anything it does
3610
- * not recognise, so an unknown value degrades to "no task declared" rather than
3611
- * failing the request.
3612
- *
3613
- * ⚠ These string values are a wire contract with ai-portal. Adding one here
3614
- * before the portal knows it is harmless (it is dropped); renaming or removing
3615
- * one silently stops that flow being counted. Keep them in step with
3616
- * `AllTaskTypes` on the portal side, and see ai-portal
3617
- * `docs/BACKEND_OWNED_TASK_PROMPTS.md` for the rollout.
3618
- *
3619
- * ⚠ RELEASE ORDER. This union is a PUBLIC type, so a split is breaking in both
3620
- * directions and has to be sequenced:
3621
- *
3622
- * 1. merge + publish this package;
3623
- * 2. bump `@anuma/sdk` in the consumer and switch its call sites to the new
3624
- * names in the same commit.
3625
- *
3626
- * A consumer on the OLD version cannot compile the new names, and a consumer on
3627
- * the NEW version cannot compile the retired ones (`app_inspiration` is gone
3628
- * here, replaced by the three `app_inspiration_*` names). Both halves of that
3629
- * are type-only — the wire itself always degrades safely, because the portal
3630
- * drops any value it does not recognise. Concretely: ai-memoryless-client#5782
3631
- * is blocked on this publish for exactly that reason.
3632
- *
3633
- * Deliberately ABSENT: agent personas, `reflect()` when it answers the user, and
3634
- * the app-idea chat. Those carry an open conversation with the user, so a fixed
3635
- * server-owned prompt would be wrong rather than merely premature — the same
3636
- * boundary {@link INTERNAL_FLOW_MARKER} draws.
3637
- *
3638
- * @public
3639
- */
3640
- type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
3641
-
3642
3643
  /**
3643
3644
  * Auth for portal LLM calls (extraction, consolidation, decomposition,
3644
3645
  * reflection). Mirrors `memoryEngine`'s `EmbeddingOptions` dual-auth:
@@ -3853,6 +3854,7 @@ type VaultEmbeddingCache = Map<string, Float32Array>;
3853
3854
  * Options for the vault search tool.
3854
3855
  */
3855
3856
  interface MemoryVaultSearchOptions {
3857
+ onCandidateCount?: (count: number) => void;
3856
3858
  /** Maximum number of results to return (default: 5) */
3857
3859
  limit?: number;
3858
3860
  /** Minimum similarity threshold below which results are discarded (default: 0.1) */
@@ -4674,6 +4676,7 @@ interface RecallDiagnostics {
4674
4676
  * happened.
4675
4677
  */
4676
4678
  truncated: boolean;
4679
+ truncatedByBudget?: boolean;
4677
4680
  /** Memory ids the W5 graph (entity) side lane contributed to the fusion. */
4678
4681
  graphLaneCount: number;
4679
4682
  /** Memory ids the W6 temporal side lane contributed to the fusion. */
@@ -4731,6 +4734,16 @@ interface RecallDiagnostics {
4731
4734
  /** Soft-degradation signals that fired this call (empty when clean). */
4732
4735
  degraded: RecallDegradation[];
4733
4736
  }
4737
+ interface RecallTruncation {
4738
+ requestedLimit: number;
4739
+ effectiveLimit: number;
4740
+ truncatedByBudget: boolean;
4741
+ }
4742
+ interface RecallTelemetryCallbacks {
4743
+ onDiagnostics?: (diagnostics: RecallDiagnostics) => void;
4744
+ onTruncated?: (truncation: RecallTruncation) => void;
4745
+ onError?: (error: Error) => void;
4746
+ }
4734
4747
  type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
4735
4748
  /**
4736
4749
  * The consolidation LLM's decision for a candidate, when it made one. Reported
@@ -6162,6 +6175,16 @@ declare function classifyDecay(m: DecayInput, now: number, policy?: Partial<Deca
6162
6175
 
6163
6176
  /** Counts from one sweep, for UI surfacing (e.g. "N memories archived"). */
6164
6177
  interface DecaySweepResult {
6178
+ ruleDriven: {
6179
+ archived: number;
6180
+ deleted: number;
6181
+ };
6182
+ classifierDriven: {
6183
+ archived: number;
6184
+ deleted: number;
6185
+ };
6186
+ classifierCalls: number;
6187
+ classifierCapHits: number;
6165
6188
  /** Rows transitioned active → archived this sweep. */
6166
6189
  archived: number;
6167
6190
  /** Rows hard-deleted (archived past the window) this sweep. */
@@ -6264,11 +6287,19 @@ interface TopicExtractionInput {
6264
6287
  id: string;
6265
6288
  content: string;
6266
6289
  }
6290
+ interface TopicExtractionBatchDiagnostics {
6291
+ memoryIds: string[];
6292
+ attempts: number;
6293
+ durationMs: number;
6294
+ unansweredCount: number;
6295
+ failure?: PortalLlmFailure;
6296
+ }
6267
6297
  /**
6268
6298
  * Options for the topic-extraction LLM call. Auth follows the portal dual
6269
6299
  * pattern — one of `apiKey` / `getToken` is required (see {@link PortalLlmAuth}).
6270
6300
  */
6271
6301
  interface TopicExtractOptions extends PortalLlmAuth {
6302
+ onBatch?: (diagnostics: TopicExtractionBatchDiagnostics) => void;
6272
6303
  baseUrl?: string;
6273
6304
  /**
6274
6305
  * Optional per-call request path override, forwarded to
@@ -6353,6 +6384,10 @@ type TopicSkipReason = "excluded" | "link-declined" | "stamp-declined" | "llm-un
6353
6384
  declare function isDegradedTopicSkip(reason: TopicSkipReason): boolean;
6354
6385
  /** Outcome of one {@link extractAndLinkEntitiesForMemoriesOp} run. */
6355
6386
  interface TopicExtractionRunResult {
6387
+ batchCount: number;
6388
+ durationMs: number;
6389
+ batches: TopicExtractionBatchDiagnostics[];
6390
+ llmFailures: Map<string, PortalLlmFailure>;
6356
6391
  /** memoryId → entities the LLM returned (post-validation, post-linking). */
6357
6392
  entitiesByMemory: Map<string, ExtractedEntity[]>;
6358
6393
  /** Memories stamped `topics_extracted_at` this run — includes zero-entity
@@ -9284,7 +9319,7 @@ interface RecallToolOptions {
9284
9319
  * against wall-clock today, which is wrong for any historical dataset. */
9285
9320
  now?: number;
9286
9321
  }
9287
- interface RecallToolCallbacks {
9322
+ interface RecallToolCallbacks extends RecallTelemetryCallbacks {
9288
9323
  /** Called with the conversation IDs returned via the chunk lane. */
9289
9324
  onChunksRetrieved?: (conversationIds: string[]) => void;
9290
9325
  /** Called with the fact IDs returned via the fact lane. */
@@ -10556,7 +10591,7 @@ declare function decodeChunkVector(vector: number[] | string | null | undefined,
10556
10591
  * @param searchOptions - Optional search configuration
10557
10592
  * @returns A ToolConfig that can be passed to chat completion tools
10558
10593
  */
10559
- declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext | MemoryStore, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): ToolConfig;
10594
+ declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext | MemoryStore, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions, callbacks?: RecallTelemetryCallbacks): ToolConfig;
10560
10595
 
10561
10596
  declare const MANUAL_FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "other"];
10562
10597
  /** A FactType the save tool's optional `type` argument may carry. */
@@ -10972,6 +11007,7 @@ type UseChatResult = BaseUseChatResult & {
10972
11007
  * off, or no inference id had been issued yet). Pair with `resumeStream`.
10973
11008
  */
10974
11009
  detach: () => StreamResumeHandle | null;
11010
+ cancel: (handle: StreamResumeHandle) => void;
10975
11011
  /**
10976
11012
  * Replay a detached stream from the portal's buffer (GET from seq 0, fresh
10977
11013
  * accumulator). Thin hook wrapper over the library `resumeStream` — supplies
@@ -11176,9 +11212,6 @@ type SendMessageWithStorageArgs = BaseSendMessageWithStorageArgs & {
11176
11212
  * Detached variant of the storage send result.
11177
11213
  *
11178
11214
  * Returned only when `resumable` is on and the stream was torn down via
11179
- * `detach()` before completing. The partial assistant row is already persisted
11180
- * (under `assistantUniqueId`); call `resumeStream` with `handle` +
11181
- * `assistantUniqueId` to complete that SAME row.
11182
11215
  */
11183
11216
  interface SendMessageWithStorageDetachedResult {
11184
11217
  data: ApiResponse | null;
@@ -11187,9 +11220,6 @@ interface SendMessageWithStorageDetachedResult {
11187
11220
  /** Pass to `resumeStream` to replay; null when nothing was resumable. */
11188
11221
  resume: StreamResumeHandle | null;
11189
11222
  /**
11190
- * The id the resumed/expired/interrupted completion reconciles onto. Nothing
11191
- * is persisted on detach — the row materializes when resumeStream() (or
11192
- * stop()) finalizes the turn under this id.
11193
11223
  *
11194
11224
  * Present whenever storage is active. Absent under `skipStorage`: there is no
11195
11225
  * persisted row to reconcile, so drive `resumeStream(resume)` on the handle
@@ -11385,4 +11415,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
11385
11415
  */
11386
11416
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
11387
11417
 
11388
- 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11418
+ 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };