@anuma/sdk 3.9.5 → 3.10.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.
- package/dist/expo/{chunk-HXBDHRKJ.mjs → chunk-CFGUZHAY.mjs} +95 -14
- package/dist/expo/{consolidate-HKN32P5W.mjs → consolidate-NC5DOC5J.mjs} +3 -2
- package/dist/expo/index.cjs +168 -35
- package/dist/expo/index.d.mts +88 -2
- package/dist/expo/index.d.ts +88 -2
- package/dist/expo/index.mjs +68 -16
- package/dist/{react/recall-7NVXMANO.mjs → expo/recall-34WI57Z7.mjs} +1 -1
- package/dist/react/{chunk-IWR7BNER.mjs → chunk-SCFNOAWH.mjs} +95 -14
- package/dist/react/{consolidate-7UUX56GM.mjs → consolidate-54UWIMP6.mjs} +3 -2
- package/dist/react/index.cjs +168 -35
- package/dist/react/index.d.mts +88 -2
- package/dist/react/index.d.ts +88 -2
- package/dist/react/index.mjs +68 -16
- package/dist/{expo/recall-I5AZFOUM.mjs → react/recall-GCW2EV4V.mjs} +1 -1
- package/dist/server/{chunk-UU2F523R.mjs → chunk-Q4ACA4RO.mjs} +95 -14
- package/dist/server/{consolidate-BKLNVH5Y.mjs → consolidate-YCD45CXO.mjs} +3 -2
- package/dist/server/index.cjs +168 -35
- package/dist/server/index.d.mts +88 -2
- package/dist/server/index.d.ts +88 -2
- package/dist/server/index.mjs +68 -16
- package/dist/server/{recall-RVRZ4RQT.mjs → recall-XO6QTDMG.mjs} +1 -1
- package/package.json +3 -2
package/dist/server/index.d.mts
CHANGED
|
@@ -73,8 +73,13 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
|
|
|
73
73
|
* backfill (null = legacy/untyped, active, un-screened — content is
|
|
74
74
|
* encrypted so in-migration classification is impossible; NULL = zero-risk,
|
|
75
75
|
* exact embedding_model precedent)
|
|
76
|
+
* - v41: Added visibility, twin_opt_in, published_at, geohash columns to
|
|
77
|
+
* memory_vault for the People Nearby cross-user visibility axis. Visibility
|
|
78
|
+
* is TWO-tier (`private | public`); null — and any unrecognised value —
|
|
79
|
+
* reads as 'private', so nothing pre-existing is ever published without an
|
|
80
|
+
* explicit visibility write
|
|
76
81
|
*/
|
|
77
|
-
declare const SDK_SCHEMA_VERSION =
|
|
82
|
+
declare const SDK_SCHEMA_VERSION = 41;
|
|
78
83
|
/**
|
|
79
84
|
* Combined WatermelonDB schema for all SDK storage modules.
|
|
80
85
|
*
|
|
@@ -159,6 +164,7 @@ declare const sdkSchema: Readonly<{
|
|
|
159
164
|
* - v37 → v38: Added `topics_extracted_version` column to memory_vault (extraction-logic version; null read as 0 so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows)
|
|
160
165
|
* - v38 → v39: Added `last_observed_at` column to memory_vault (C3 re-observation watermark; stamped on retain merge, distinct from updated_at)
|
|
161
166
|
* - v39 → v40: Added `fact_type`, `archived_at`, `trust_tier` columns to memory_vault for typed memory + decay + Tier-0 security (all nullable + plaintext, NULL backfill)
|
|
167
|
+
* - v40 → v41: Added `visibility`, `twin_opt_in`, `published_at`, `geohash` columns to memory_vault for the People Nearby cross-user visibility axis (two-tier `private | public`; null/unknown grandfathered as 'private')
|
|
162
168
|
*/
|
|
163
169
|
declare const sdkMigrations: Readonly<{
|
|
164
170
|
validated: true;
|
|
@@ -4319,6 +4325,15 @@ declare class VaultMemory extends Model$1 {
|
|
|
4319
4325
|
archivedAt: number | null;
|
|
4320
4326
|
/** Tier-0 security (PR3) — "quarantined" | "trusted" | null. */
|
|
4321
4327
|
trustTier: string | null;
|
|
4328
|
+
/** People Nearby visibility: 'private' | 'public'. Null on legacy rows, and
|
|
4329
|
+
* any unrecognised value, read as 'private' — never published without opt-in. */
|
|
4330
|
+
visibility: string | null;
|
|
4331
|
+
/** Owner opted this memory into their own digital twin (twin-scoped only). */
|
|
4332
|
+
twinOptIn: boolean | null;
|
|
4333
|
+
/** Unix ms when visibility last became non-private; null while private. */
|
|
4334
|
+
publishedAt: number | null;
|
|
4335
|
+
/** Reserved coarse-geohash slot for landmark/Trail memories. */
|
|
4336
|
+
geohash: string | null;
|
|
4322
4337
|
createdAt: Date;
|
|
4323
4338
|
updatedAt: Date;
|
|
4324
4339
|
isDeleted: boolean;
|
|
@@ -5579,6 +5594,20 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
|
|
|
5579
5594
|
quarantined: QuarantinedMemoryInfo[];
|
|
5580
5595
|
}>;
|
|
5581
5596
|
|
|
5597
|
+
/**
|
|
5598
|
+
* People Nearby cross-user visibility. ORTHOGONAL to `scope` (model access):
|
|
5599
|
+
* - `private`: local-only (default; null column grandfathered as private)
|
|
5600
|
+
* - `public`: embedding + plaintext may be published (compatibility matching,
|
|
5601
|
+
* profile display, discovery answers, digital-twin prompts)
|
|
5602
|
+
*
|
|
5603
|
+
* TWO TIERS ONLY (decided 2026-07-27). An earlier design had a middle
|
|
5604
|
+
* `matchable` tier that published a memory's embedding while keeping its text
|
|
5605
|
+
* on-device; it was dropped, so a memory either never leaves the device or is
|
|
5606
|
+
* published with its content. Any unrecognised stored value — including a
|
|
5607
|
+
* `matchable` row written by a pre-release build — reads as `private`, which is
|
|
5608
|
+
* the fail-safe direction: it un-publishes rather than exposes.
|
|
5609
|
+
*/
|
|
5610
|
+
type VaultMemoryVisibility = "private" | "public";
|
|
5582
5611
|
interface StoredVaultMemory {
|
|
5583
5612
|
/** WatermelonDB internal ID */
|
|
5584
5613
|
uniqueId: string;
|
|
@@ -5637,6 +5666,15 @@ interface StoredVaultMemory {
|
|
|
5637
5666
|
archivedAt: number | null;
|
|
5638
5667
|
/** Tier-0 security (PR3) — "quarantined" | "trusted" | null. */
|
|
5639
5668
|
trustTier: string | null;
|
|
5669
|
+
/** People Nearby cross-user visibility. Null column reads as "private". */
|
|
5670
|
+
visibility: VaultMemoryVisibility;
|
|
5671
|
+
/** Owner opted this memory into their own digital twin even when otherwise
|
|
5672
|
+
* private (twin-scoped only — never indexed for matching, never displayed). */
|
|
5673
|
+
twinOptIn: boolean;
|
|
5674
|
+
/** Unix ms when visibility last became non-private; null while private. */
|
|
5675
|
+
publishedAt: number | null;
|
|
5676
|
+
/** Reserved coarse-geohash slot for landmark/Trail memories. */
|
|
5677
|
+
geohash: string | null;
|
|
5640
5678
|
createdAt: Date;
|
|
5641
5679
|
updatedAt: Date;
|
|
5642
5680
|
isDeleted: boolean;
|
|
@@ -5673,6 +5711,15 @@ interface CreateVaultMemoryOptions {
|
|
|
5673
5711
|
/** Tier-0 security (PR3) — set "quarantined" when the injection screen
|
|
5674
5712
|
* flagged this fact. Omit for the default (null/trusted). */
|
|
5675
5713
|
trustTier?: string;
|
|
5714
|
+
/** People Nearby cross-user visibility. Defaults to "private" if omitted —
|
|
5715
|
+
* creation NEVER publishes; use {@link setMemoryVisibilityOp} so the
|
|
5716
|
+
* published_at bookkeeping stays consistent. Accepted here only so bulk
|
|
5717
|
+
* restore/import paths can round-trip an existing visibility. */
|
|
5718
|
+
visibility?: VaultMemoryVisibility;
|
|
5719
|
+
/** Round-trip slot for restore/import; see {@link visibility}. */
|
|
5720
|
+
publishedAt?: number | null;
|
|
5721
|
+
/** Coarse geohash for location-tagged memory sources (landmarks/Trail). */
|
|
5722
|
+
geohash?: string;
|
|
5676
5723
|
}
|
|
5677
5724
|
interface UpdateVaultMemoryOptions {
|
|
5678
5725
|
content: string;
|
|
@@ -5795,11 +5842,35 @@ declare function getAllVaultMemoriesOp(ctx: VaultMemoryOperationsContext, option
|
|
|
5795
5842
|
* Used by a "memory history" view to render retired facts.
|
|
5796
5843
|
*/
|
|
5797
5844
|
includeSuperseded?: boolean;
|
|
5845
|
+
/**
|
|
5846
|
+
* Filter by People Nearby visibility. Legacy rows with a NULL column
|
|
5847
|
+
* count as "private". Used by the publish reconciler to fetch the
|
|
5848
|
+
* published set to diff against the server index.
|
|
5849
|
+
*/
|
|
5850
|
+
visibility?: VaultMemoryVisibility[];
|
|
5798
5851
|
}): Promise<StoredVaultMemory[]>;
|
|
5799
5852
|
declare function getAllVaultMemoryContentsOp(ctx: VaultMemoryOperationsContext, options?: {
|
|
5800
5853
|
since?: Date;
|
|
5801
5854
|
}): Promise<string[]>;
|
|
5802
5855
|
declare function updateVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string, opts: UpdateVaultMemoryOptions): Promise<StoredVaultMemory | null>;
|
|
5856
|
+
/**
|
|
5857
|
+
* Set a memory's People Nearby visibility (and optionally its twin opt-in).
|
|
5858
|
+
*
|
|
5859
|
+
* This is the ONLY sanctioned write path for `visibility` — it keeps the
|
|
5860
|
+
* `published_at` bookkeeping consistent: transitioning to `public`
|
|
5861
|
+
* stamps `published_at` (kept if already set); transitioning to `private`
|
|
5862
|
+
* clears it (revoke). The server index remains the authority for what IS
|
|
5863
|
+
* published — this records the user's intent for the reconciler to act on.
|
|
5864
|
+
*
|
|
5865
|
+
* Preserves `updated_at`: a visibility change is metadata, not a
|
|
5866
|
+
* re-observation, so it must not inflate the recency multiplier (mirrors
|
|
5867
|
+
* {@link setMemoryEntitiesOp}).
|
|
5868
|
+
*/
|
|
5869
|
+
declare function setMemoryVisibilityOp(ctx: VaultMemoryOperationsContext, id: string, opts: {
|
|
5870
|
+
visibility: VaultMemoryVisibility;
|
|
5871
|
+
/** If provided, sets the twin opt-in flag alongside the visibility. */
|
|
5872
|
+
twinOptIn?: boolean;
|
|
5873
|
+
}): Promise<StoredVaultMemory | null>;
|
|
5803
5874
|
declare function deleteVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string): Promise<boolean>;
|
|
5804
5875
|
/**
|
|
5805
5876
|
* Mark a memory as superseded by a newer one (A2 write-time supersession).
|
|
@@ -7145,6 +7216,21 @@ interface CreateAutoExtractorOptions {
|
|
|
7145
7216
|
*/
|
|
7146
7217
|
onFallback?: (reason: ConsolidationFallbackReason) => void;
|
|
7147
7218
|
};
|
|
7219
|
+
/**
|
|
7220
|
+
* Tier-0 security (PR5) — enable the optional SECOND-layer LLM injection
|
|
7221
|
+
* classifier over the candidates the deterministic screen passed as clean.
|
|
7222
|
+
* Presence is the switch, so `injectionClassifier: {}` is how a client turns
|
|
7223
|
+
* it on. Auth is NOT configured here — like `consolidate`, the call reuses
|
|
7224
|
+
* the `extract` credentials and defaults to its `baseUrl`. See
|
|
7225
|
+
* `injectionClassifier.ts` for the safety posture and the defaults.
|
|
7226
|
+
*/
|
|
7227
|
+
injectionClassifier?: {
|
|
7228
|
+
/** Portal base URL for classifier calls. Default: the `extract` options' `baseUrl`. */
|
|
7229
|
+
baseUrl?: string;
|
|
7230
|
+
model?: string;
|
|
7231
|
+
maxCandidates?: number;
|
|
7232
|
+
totalTimeoutMs?: number;
|
|
7233
|
+
};
|
|
7148
7234
|
/** Per-fact event — fires once per memory written. */
|
|
7149
7235
|
onMemoryExtracted?: (event: MemoryExtractedEvent) => void;
|
|
7150
7236
|
/**
|
|
@@ -9276,4 +9362,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
9276
9362
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
9277
9363
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
9278
9364
|
|
|
9279
|
-
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
|
9365
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -73,8 +73,13 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
|
|
|
73
73
|
* backfill (null = legacy/untyped, active, un-screened — content is
|
|
74
74
|
* encrypted so in-migration classification is impossible; NULL = zero-risk,
|
|
75
75
|
* exact embedding_model precedent)
|
|
76
|
+
* - v41: Added visibility, twin_opt_in, published_at, geohash columns to
|
|
77
|
+
* memory_vault for the People Nearby cross-user visibility axis. Visibility
|
|
78
|
+
* is TWO-tier (`private | public`); null — and any unrecognised value —
|
|
79
|
+
* reads as 'private', so nothing pre-existing is ever published without an
|
|
80
|
+
* explicit visibility write
|
|
76
81
|
*/
|
|
77
|
-
declare const SDK_SCHEMA_VERSION =
|
|
82
|
+
declare const SDK_SCHEMA_VERSION = 41;
|
|
78
83
|
/**
|
|
79
84
|
* Combined WatermelonDB schema for all SDK storage modules.
|
|
80
85
|
*
|
|
@@ -159,6 +164,7 @@ declare const sdkSchema: Readonly<{
|
|
|
159
164
|
* - v37 → v38: Added `topics_extracted_version` column to memory_vault (extraction-logic version; null read as 0 so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows)
|
|
160
165
|
* - v38 → v39: Added `last_observed_at` column to memory_vault (C3 re-observation watermark; stamped on retain merge, distinct from updated_at)
|
|
161
166
|
* - v39 → v40: Added `fact_type`, `archived_at`, `trust_tier` columns to memory_vault for typed memory + decay + Tier-0 security (all nullable + plaintext, NULL backfill)
|
|
167
|
+
* - v40 → v41: Added `visibility`, `twin_opt_in`, `published_at`, `geohash` columns to memory_vault for the People Nearby cross-user visibility axis (two-tier `private | public`; null/unknown grandfathered as 'private')
|
|
162
168
|
*/
|
|
163
169
|
declare const sdkMigrations: Readonly<{
|
|
164
170
|
validated: true;
|
|
@@ -4319,6 +4325,15 @@ declare class VaultMemory extends Model$1 {
|
|
|
4319
4325
|
archivedAt: number | null;
|
|
4320
4326
|
/** Tier-0 security (PR3) — "quarantined" | "trusted" | null. */
|
|
4321
4327
|
trustTier: string | null;
|
|
4328
|
+
/** People Nearby visibility: 'private' | 'public'. Null on legacy rows, and
|
|
4329
|
+
* any unrecognised value, read as 'private' — never published without opt-in. */
|
|
4330
|
+
visibility: string | null;
|
|
4331
|
+
/** Owner opted this memory into their own digital twin (twin-scoped only). */
|
|
4332
|
+
twinOptIn: boolean | null;
|
|
4333
|
+
/** Unix ms when visibility last became non-private; null while private. */
|
|
4334
|
+
publishedAt: number | null;
|
|
4335
|
+
/** Reserved coarse-geohash slot for landmark/Trail memories. */
|
|
4336
|
+
geohash: string | null;
|
|
4322
4337
|
createdAt: Date;
|
|
4323
4338
|
updatedAt: Date;
|
|
4324
4339
|
isDeleted: boolean;
|
|
@@ -5579,6 +5594,20 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
|
|
|
5579
5594
|
quarantined: QuarantinedMemoryInfo[];
|
|
5580
5595
|
}>;
|
|
5581
5596
|
|
|
5597
|
+
/**
|
|
5598
|
+
* People Nearby cross-user visibility. ORTHOGONAL to `scope` (model access):
|
|
5599
|
+
* - `private`: local-only (default; null column grandfathered as private)
|
|
5600
|
+
* - `public`: embedding + plaintext may be published (compatibility matching,
|
|
5601
|
+
* profile display, discovery answers, digital-twin prompts)
|
|
5602
|
+
*
|
|
5603
|
+
* TWO TIERS ONLY (decided 2026-07-27). An earlier design had a middle
|
|
5604
|
+
* `matchable` tier that published a memory's embedding while keeping its text
|
|
5605
|
+
* on-device; it was dropped, so a memory either never leaves the device or is
|
|
5606
|
+
* published with its content. Any unrecognised stored value — including a
|
|
5607
|
+
* `matchable` row written by a pre-release build — reads as `private`, which is
|
|
5608
|
+
* the fail-safe direction: it un-publishes rather than exposes.
|
|
5609
|
+
*/
|
|
5610
|
+
type VaultMemoryVisibility = "private" | "public";
|
|
5582
5611
|
interface StoredVaultMemory {
|
|
5583
5612
|
/** WatermelonDB internal ID */
|
|
5584
5613
|
uniqueId: string;
|
|
@@ -5637,6 +5666,15 @@ interface StoredVaultMemory {
|
|
|
5637
5666
|
archivedAt: number | null;
|
|
5638
5667
|
/** Tier-0 security (PR3) — "quarantined" | "trusted" | null. */
|
|
5639
5668
|
trustTier: string | null;
|
|
5669
|
+
/** People Nearby cross-user visibility. Null column reads as "private". */
|
|
5670
|
+
visibility: VaultMemoryVisibility;
|
|
5671
|
+
/** Owner opted this memory into their own digital twin even when otherwise
|
|
5672
|
+
* private (twin-scoped only — never indexed for matching, never displayed). */
|
|
5673
|
+
twinOptIn: boolean;
|
|
5674
|
+
/** Unix ms when visibility last became non-private; null while private. */
|
|
5675
|
+
publishedAt: number | null;
|
|
5676
|
+
/** Reserved coarse-geohash slot for landmark/Trail memories. */
|
|
5677
|
+
geohash: string | null;
|
|
5640
5678
|
createdAt: Date;
|
|
5641
5679
|
updatedAt: Date;
|
|
5642
5680
|
isDeleted: boolean;
|
|
@@ -5673,6 +5711,15 @@ interface CreateVaultMemoryOptions {
|
|
|
5673
5711
|
/** Tier-0 security (PR3) — set "quarantined" when the injection screen
|
|
5674
5712
|
* flagged this fact. Omit for the default (null/trusted). */
|
|
5675
5713
|
trustTier?: string;
|
|
5714
|
+
/** People Nearby cross-user visibility. Defaults to "private" if omitted —
|
|
5715
|
+
* creation NEVER publishes; use {@link setMemoryVisibilityOp} so the
|
|
5716
|
+
* published_at bookkeeping stays consistent. Accepted here only so bulk
|
|
5717
|
+
* restore/import paths can round-trip an existing visibility. */
|
|
5718
|
+
visibility?: VaultMemoryVisibility;
|
|
5719
|
+
/** Round-trip slot for restore/import; see {@link visibility}. */
|
|
5720
|
+
publishedAt?: number | null;
|
|
5721
|
+
/** Coarse geohash for location-tagged memory sources (landmarks/Trail). */
|
|
5722
|
+
geohash?: string;
|
|
5676
5723
|
}
|
|
5677
5724
|
interface UpdateVaultMemoryOptions {
|
|
5678
5725
|
content: string;
|
|
@@ -5795,11 +5842,35 @@ declare function getAllVaultMemoriesOp(ctx: VaultMemoryOperationsContext, option
|
|
|
5795
5842
|
* Used by a "memory history" view to render retired facts.
|
|
5796
5843
|
*/
|
|
5797
5844
|
includeSuperseded?: boolean;
|
|
5845
|
+
/**
|
|
5846
|
+
* Filter by People Nearby visibility. Legacy rows with a NULL column
|
|
5847
|
+
* count as "private". Used by the publish reconciler to fetch the
|
|
5848
|
+
* published set to diff against the server index.
|
|
5849
|
+
*/
|
|
5850
|
+
visibility?: VaultMemoryVisibility[];
|
|
5798
5851
|
}): Promise<StoredVaultMemory[]>;
|
|
5799
5852
|
declare function getAllVaultMemoryContentsOp(ctx: VaultMemoryOperationsContext, options?: {
|
|
5800
5853
|
since?: Date;
|
|
5801
5854
|
}): Promise<string[]>;
|
|
5802
5855
|
declare function updateVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string, opts: UpdateVaultMemoryOptions): Promise<StoredVaultMemory | null>;
|
|
5856
|
+
/**
|
|
5857
|
+
* Set a memory's People Nearby visibility (and optionally its twin opt-in).
|
|
5858
|
+
*
|
|
5859
|
+
* This is the ONLY sanctioned write path for `visibility` — it keeps the
|
|
5860
|
+
* `published_at` bookkeeping consistent: transitioning to `public`
|
|
5861
|
+
* stamps `published_at` (kept if already set); transitioning to `private`
|
|
5862
|
+
* clears it (revoke). The server index remains the authority for what IS
|
|
5863
|
+
* published — this records the user's intent for the reconciler to act on.
|
|
5864
|
+
*
|
|
5865
|
+
* Preserves `updated_at`: a visibility change is metadata, not a
|
|
5866
|
+
* re-observation, so it must not inflate the recency multiplier (mirrors
|
|
5867
|
+
* {@link setMemoryEntitiesOp}).
|
|
5868
|
+
*/
|
|
5869
|
+
declare function setMemoryVisibilityOp(ctx: VaultMemoryOperationsContext, id: string, opts: {
|
|
5870
|
+
visibility: VaultMemoryVisibility;
|
|
5871
|
+
/** If provided, sets the twin opt-in flag alongside the visibility. */
|
|
5872
|
+
twinOptIn?: boolean;
|
|
5873
|
+
}): Promise<StoredVaultMemory | null>;
|
|
5803
5874
|
declare function deleteVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string): Promise<boolean>;
|
|
5804
5875
|
/**
|
|
5805
5876
|
* Mark a memory as superseded by a newer one (A2 write-time supersession).
|
|
@@ -7145,6 +7216,21 @@ interface CreateAutoExtractorOptions {
|
|
|
7145
7216
|
*/
|
|
7146
7217
|
onFallback?: (reason: ConsolidationFallbackReason) => void;
|
|
7147
7218
|
};
|
|
7219
|
+
/**
|
|
7220
|
+
* Tier-0 security (PR5) — enable the optional SECOND-layer LLM injection
|
|
7221
|
+
* classifier over the candidates the deterministic screen passed as clean.
|
|
7222
|
+
* Presence is the switch, so `injectionClassifier: {}` is how a client turns
|
|
7223
|
+
* it on. Auth is NOT configured here — like `consolidate`, the call reuses
|
|
7224
|
+
* the `extract` credentials and defaults to its `baseUrl`. See
|
|
7225
|
+
* `injectionClassifier.ts` for the safety posture and the defaults.
|
|
7226
|
+
*/
|
|
7227
|
+
injectionClassifier?: {
|
|
7228
|
+
/** Portal base URL for classifier calls. Default: the `extract` options' `baseUrl`. */
|
|
7229
|
+
baseUrl?: string;
|
|
7230
|
+
model?: string;
|
|
7231
|
+
maxCandidates?: number;
|
|
7232
|
+
totalTimeoutMs?: number;
|
|
7233
|
+
};
|
|
7148
7234
|
/** Per-fact event — fires once per memory written. */
|
|
7149
7235
|
onMemoryExtracted?: (event: MemoryExtractedEvent) => void;
|
|
7150
7236
|
/**
|
|
@@ -9276,4 +9362,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
9276
9362
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
9277
9363
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
9278
9364
|
|
|
9279
|
-
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
|
9365
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
package/dist/server/index.mjs
CHANGED
|
@@ -111,6 +111,7 @@ import {
|
|
|
111
111
|
searchChunksOp,
|
|
112
112
|
searchMessagesOp,
|
|
113
113
|
searchVaultMemories,
|
|
114
|
+
setMemoryVisibilityOp,
|
|
114
115
|
shouldChunkMessage,
|
|
115
116
|
stampTopicsExtractedAtOp,
|
|
116
117
|
stripToolCalls,
|
|
@@ -127,7 +128,7 @@ import {
|
|
|
127
128
|
updateVaultMemoryOp,
|
|
128
129
|
upsertMessageOp,
|
|
129
130
|
vaultMemoryToStored
|
|
130
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-Q4ACA4RO.mjs";
|
|
131
132
|
import {
|
|
132
133
|
createStreamingDeAnonymizer,
|
|
133
134
|
resolvePiiRedactor
|
|
@@ -1143,6 +1144,18 @@ __decorateClass([
|
|
|
1143
1144
|
__decorateClass([
|
|
1144
1145
|
(0, import_decorators6.field)("trust_tier")
|
|
1145
1146
|
], VaultMemory.prototype, "trustTier", 2);
|
|
1147
|
+
__decorateClass([
|
|
1148
|
+
(0, import_decorators6.field)("visibility")
|
|
1149
|
+
], VaultMemory.prototype, "visibility", 2);
|
|
1150
|
+
__decorateClass([
|
|
1151
|
+
(0, import_decorators6.field)("twin_opt_in")
|
|
1152
|
+
], VaultMemory.prototype, "twinOptIn", 2);
|
|
1153
|
+
__decorateClass([
|
|
1154
|
+
(0, import_decorators6.field)("published_at")
|
|
1155
|
+
], VaultMemory.prototype, "publishedAt", 2);
|
|
1156
|
+
__decorateClass([
|
|
1157
|
+
(0, import_decorators6.field)("geohash")
|
|
1158
|
+
], VaultMemory.prototype, "geohash", 2);
|
|
1146
1159
|
__decorateClass([
|
|
1147
1160
|
import_decorators6.readonly,
|
|
1148
1161
|
(0, import_decorators6.date)("created_at")
|
|
@@ -1290,7 +1303,7 @@ __decorateClass([
|
|
|
1290
1303
|
], VaultFolder.prototype, "context", 2);
|
|
1291
1304
|
|
|
1292
1305
|
// src/lib/db/schema.ts
|
|
1293
|
-
var SDK_SCHEMA_VERSION =
|
|
1306
|
+
var SDK_SCHEMA_VERSION = 41;
|
|
1294
1307
|
var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
1295
1308
|
version: SDK_SCHEMA_VERSION,
|
|
1296
1309
|
tables: [
|
|
@@ -1449,7 +1462,26 @@ var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
|
1449
1462
|
// Tier-0 security (PR3) — "quarantined" when the write-time injection
|
|
1450
1463
|
// screen flagged this fact, else null/"trusted". Indexed so the recall
|
|
1451
1464
|
// choke point can default-exclude quarantined rows.
|
|
1452
|
-
{ name: "trust_tier", type: "string", isOptional: true, isIndexed: true }
|
|
1465
|
+
{ name: "trust_tier", type: "string", isOptional: true, isIndexed: true },
|
|
1466
|
+
// People Nearby cross-user visibility axis — ORTHOGONAL to `scope`
|
|
1467
|
+
// (which partitions by MODEL access: private vs shared providers).
|
|
1468
|
+
// TWO tiers: 'private' (or null, or any unrecognised value —
|
|
1469
|
+
// grandfathered / fail-safe) = local-only; 'public' = embedding +
|
|
1470
|
+
// plaintext may be published (matching/profile/discovery/twin).
|
|
1471
|
+
// The server index is the authority for what IS published; this
|
|
1472
|
+
// column records the user's intent.
|
|
1473
|
+
{ name: "visibility", type: "string", isOptional: true, isIndexed: true },
|
|
1474
|
+
// When true, the owner opted this memory into their own digital twin
|
|
1475
|
+
// even if it is otherwise private (twin-scoped upload only — never
|
|
1476
|
+
// indexed for matching, never displayed). Null/false = follows visibility.
|
|
1477
|
+
{ name: "twin_opt_in", type: "boolean", isOptional: true },
|
|
1478
|
+
// Unix ms when visibility last became non-private. Null when private
|
|
1479
|
+
// (cleared on revoke) — the publish reconciler uses it to diff local
|
|
1480
|
+
// intent against the server index.
|
|
1481
|
+
{ name: "published_at", type: "number", isOptional: true },
|
|
1482
|
+
// Reserved geo slot (coarse geohash) for landmark/Trail memories.
|
|
1483
|
+
// Unused at launch; populated by location-tagged memory sources.
|
|
1484
|
+
{ name: "geohash", type: "string", isOptional: true }
|
|
1453
1485
|
]
|
|
1454
1486
|
}),
|
|
1455
1487
|
// Entity table — canonical names extracted from auto-extraction (W5).
|
|
@@ -2124,6 +2156,24 @@ var sdkMigrations = (0, import_migrations.schemaMigrations)({
|
|
|
2124
2156
|
]
|
|
2125
2157
|
})
|
|
2126
2158
|
]
|
|
2159
|
+
},
|
|
2160
|
+
// v40 -> v41: People Nearby visibility axis on memory_vault. Existing rows
|
|
2161
|
+
// keep visibility NULL — read as 'private' (nothing pre-existing is ever
|
|
2162
|
+
// published without an explicit user action; the consent posture requires
|
|
2163
|
+
// opt-in, never a retroactive default).
|
|
2164
|
+
{
|
|
2165
|
+
toVersion: 41,
|
|
2166
|
+
steps: [
|
|
2167
|
+
(0, import_migrations.addColumns)({
|
|
2168
|
+
table: "memory_vault",
|
|
2169
|
+
columns: [
|
|
2170
|
+
{ name: "visibility", type: "string", isOptional: true, isIndexed: true },
|
|
2171
|
+
{ name: "twin_opt_in", type: "boolean", isOptional: true },
|
|
2172
|
+
{ name: "published_at", type: "number", isOptional: true },
|
|
2173
|
+
{ name: "geohash", type: "string", isOptional: true }
|
|
2174
|
+
]
|
|
2175
|
+
})
|
|
2176
|
+
]
|
|
2127
2177
|
}
|
|
2128
2178
|
]
|
|
2129
2179
|
});
|
|
@@ -5499,7 +5549,7 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
|
|
|
5499
5549
|
content: m.content,
|
|
5500
5550
|
similarity: m.similarity
|
|
5501
5551
|
}));
|
|
5502
|
-
const { consolidateMemory: doConsolidate } = await import("./consolidate-
|
|
5552
|
+
const { consolidateMemory: doConsolidate } = await import("./consolidate-YCD45CXO.mjs");
|
|
5503
5553
|
const decision = await doConsolidate(trimmed, candidates, consolidateOptions);
|
|
5504
5554
|
if (decision.action === "create") return null;
|
|
5505
5555
|
if (decision.action === "supersede" && decision.content) {
|
|
@@ -6071,18 +6121,16 @@ function createAutoExtractor(options) {
|
|
|
6071
6121
|
} catch {
|
|
6072
6122
|
}
|
|
6073
6123
|
};
|
|
6074
|
-
const
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
// extractAndRetain (so direct callers are covered too), not copied here.
|
|
6085
|
-
} : void 0;
|
|
6124
|
+
const subPassAuth = (baseUrlOverride) => {
|
|
6125
|
+
const baseUrl = baseUrlOverride ?? options.extract.baseUrl;
|
|
6126
|
+
return {
|
|
6127
|
+
...options.extract.apiKey !== void 0 && { apiKey: options.extract.apiKey },
|
|
6128
|
+
...options.extract.getToken !== void 0 && { getToken: options.extract.getToken },
|
|
6129
|
+
...baseUrl !== void 0 && { baseUrl }
|
|
6130
|
+
};
|
|
6131
|
+
};
|
|
6132
|
+
const consolidateOptions = options.consolidate ? { ...options.consolidate, ...subPassAuth(options.consolidate.baseUrl) } : void 0;
|
|
6133
|
+
const injectionClassifierOptions = options.injectionClassifier ? { ...options.injectionClassifier, ...subPassAuth(options.injectionClassifier.baseUrl) } : void 0;
|
|
6086
6134
|
if (options.retainCtx.vaultCtx.entityCtx && !options.entityCtx) {
|
|
6087
6135
|
getLogger().warn(
|
|
6088
6136
|
"[memory/extract] retainCtx.vaultCtx.entityCtx is set but extractor was created without `entityCtx` \u2014 W5 graph lane will receive no writes"
|
|
@@ -6136,6 +6184,9 @@ function createAutoExtractor(options) {
|
|
|
6136
6184
|
...options.scope !== void 0 && { scope: options.scope },
|
|
6137
6185
|
...options.folderId !== void 0 && { folderId: options.folderId },
|
|
6138
6186
|
...consolidateOptions !== void 0 && { consolidateOptions },
|
|
6187
|
+
...injectionClassifierOptions !== void 0 && {
|
|
6188
|
+
injectionClassifier: injectionClassifierOptions
|
|
6189
|
+
},
|
|
6139
6190
|
...options.onCandidateFailed && {
|
|
6140
6191
|
onCandidateFailed: (candidate, error) => options.onCandidateFailed?.({ candidate, error, conversationId })
|
|
6141
6192
|
},
|
|
@@ -13189,6 +13240,7 @@ export {
|
|
|
13189
13240
|
searchVaultMemories,
|
|
13190
13241
|
selectServerToolsForPrompt,
|
|
13191
13242
|
serverPlatformStorage,
|
|
13243
|
+
setMemoryVisibilityOp,
|
|
13192
13244
|
setModelPreferenceOp,
|
|
13193
13245
|
setUserPreferenceOp,
|
|
13194
13246
|
shouldAnalyzeStyle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anuma/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -137,8 +137,9 @@
|
|
|
137
137
|
"format:check": "prettier --check .",
|
|
138
138
|
"typecheck": "tsc --noEmit",
|
|
139
139
|
"knip": "knip",
|
|
140
|
+
"check:export-consumers": "node scripts/assert-export-consumers.mjs",
|
|
140
141
|
"check-exports": "publint && attw --pack --ignore-rules no-resolution false-cjs && node scripts/assert-no-client-self-import.mjs",
|
|
141
|
-
"check": "pnpm run lint && pnpm run knip && pnpm run format && pnpm run generate",
|
|
142
|
+
"check": "pnpm run lint && pnpm run knip && pnpm run check:export-consumers && pnpm run format && pnpm run generate",
|
|
142
143
|
"eval:extraction": "tsx test/memory/src/extraction/benchmark.test.ts",
|
|
143
144
|
"eval:topic": "tsx test/memory/src/topic/benchmark.ts",
|
|
144
145
|
"eval:consolidation": "tsx test/memory/src/consolidation/benchmark.test.ts"
|