@anuma/sdk 6.31.4 → 6.33.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/index.cjs +449 -248
- package/dist/expo/index.d.mts +433 -169
- package/dist/expo/index.d.ts +433 -169
- package/dist/expo/index.mjs +408 -209
- package/dist/memory/context.d.mts +1 -0
- package/dist/memory/context.d.ts +1 -0
- package/dist/react/index.cjs +513 -313
- package/dist/react/index.d.mts +480 -169
- package/dist/react/index.d.ts +480 -169
- package/dist/react/index.mjs +464 -268
- package/dist/server/index.cjs +416 -215
- package/dist/server/index.d.mts +431 -169
- package/dist/server/index.d.ts +431 -169
- package/dist/server/index.mjs +411 -212
- package/package.json +1 -1
package/dist/server/index.d.mts
CHANGED
|
@@ -4837,6 +4837,13 @@ declare class MemoryEntity extends Model$1 {
|
|
|
4837
4837
|
declare const ENTITY_KINDS: readonly ["person", "organization", "place", "event", "product", "thing", "concept", "other"];
|
|
4838
4838
|
/** @public */
|
|
4839
4839
|
type EntityKind = (typeof ENTITY_KINDS)[number];
|
|
4840
|
+
interface StoredEntity {
|
|
4841
|
+
uniqueId: string;
|
|
4842
|
+
canonicalName: string;
|
|
4843
|
+
kind: string | null;
|
|
4844
|
+
createdAt: Date;
|
|
4845
|
+
updatedAt: Date;
|
|
4846
|
+
}
|
|
4840
4847
|
/**
|
|
4841
4848
|
* Who put a topic on a memory. Written to `memory_vault.topics` but not yet
|
|
4842
4849
|
* READ anywhere — it exists so a later improvement can refresh the `auto`
|
|
@@ -4865,6 +4872,16 @@ interface StoredTopic {
|
|
|
4865
4872
|
source: TopicSource;
|
|
4866
4873
|
}
|
|
4867
4874
|
|
|
4875
|
+
/**
|
|
4876
|
+
* Accepted entity shape for {@link linkMemoryEntitiesOp}. A bare string is
|
|
4877
|
+
* a name with no kind (back-compat with the original signature); the object
|
|
4878
|
+
* form carries an optional classification.
|
|
4879
|
+
* @public
|
|
4880
|
+
*/
|
|
4881
|
+
type EntityInput = string | {
|
|
4882
|
+
name: string;
|
|
4883
|
+
kind?: EntityKind | (string & {});
|
|
4884
|
+
};
|
|
4868
4885
|
interface EntityOperationsContext {
|
|
4869
4886
|
database: Database;
|
|
4870
4887
|
entityCollection: Collection<Entity>;
|
|
@@ -6956,9 +6973,13 @@ interface VaultMemoryOperationsContext {
|
|
|
6956
6973
|
*/
|
|
6957
6974
|
entityCtx?: EntityOperationsContext;
|
|
6958
6975
|
}
|
|
6976
|
+
/** @deprecated App code: use `MemoryStore.create` (`createLocalMemoryStore`). */
|
|
6959
6977
|
declare function createVaultMemoryOp(ctx: VaultMemoryOperationsContext, opts: CreateVaultMemoryOptions): Promise<StoredVaultMemory>;
|
|
6978
|
+
/** @deprecated App code: use `MemoryStore.createMany` (`createLocalMemoryStore`). */
|
|
6960
6979
|
declare function createVaultMemoriesBatchOp(ctx: VaultMemoryOperationsContext, optionsArray: CreateVaultMemoryOptions[]): Promise<StoredVaultMemory[]>;
|
|
6980
|
+
/** @deprecated App code: use `MemoryStore.get` (`createLocalMemoryStore`). */
|
|
6961
6981
|
declare function getVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string): Promise<StoredVaultMemory | null>;
|
|
6982
|
+
/** @deprecated App code: use `MemoryStore.list` (`createLocalMemoryStore`). */
|
|
6962
6983
|
declare function getAllVaultMemoriesOp(ctx: VaultMemoryOperationsContext, options?: {
|
|
6963
6984
|
scopes?: string[];
|
|
6964
6985
|
since?: Date;
|
|
@@ -6994,6 +7015,7 @@ declare function getAllVaultMemoriesOp(ctx: VaultMemoryOperationsContext, option
|
|
|
6994
7015
|
declare function getAllVaultMemoryContentsOp(ctx: VaultMemoryOperationsContext, options?: {
|
|
6995
7016
|
since?: Date;
|
|
6996
7017
|
}): Promise<string[]>;
|
|
7018
|
+
/** @deprecated App code: use `MemoryStore.update` (`createLocalMemoryStore`). */
|
|
6997
7019
|
declare function updateVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string, opts: UpdateVaultMemoryOptions): Promise<StoredVaultMemory | null>;
|
|
6998
7020
|
/**
|
|
6999
7021
|
* Set a memory's People Nearby visibility (and optionally its twin opt-in).
|
|
@@ -7007,12 +7029,15 @@ declare function updateVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: stri
|
|
|
7007
7029
|
* Preserves `updated_at`: a visibility change is metadata, not a
|
|
7008
7030
|
* re-observation, so it must not inflate the recency multiplier (mirrors
|
|
7009
7031
|
* {@link setMemoryEntitiesOp}).
|
|
7032
|
+
*
|
|
7033
|
+
* @deprecated App code: use `MemoryStore.setVisibility` (`createLocalMemoryStore`).
|
|
7010
7034
|
*/
|
|
7011
7035
|
declare function setMemoryVisibilityOp(ctx: VaultMemoryOperationsContext, id: string, opts: {
|
|
7012
7036
|
visibility: VaultMemoryVisibility;
|
|
7013
7037
|
/** If provided, sets the twin opt-in flag alongside the visibility. */
|
|
7014
7038
|
twinOptIn?: boolean;
|
|
7015
7039
|
}): Promise<StoredVaultMemory | null>;
|
|
7040
|
+
/** @deprecated App code: use `MemoryStore.delete` (`createLocalMemoryStore`). */
|
|
7016
7041
|
declare function deleteVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string): Promise<boolean>;
|
|
7017
7042
|
/**
|
|
7018
7043
|
* Mark a memory as superseded by a newer one (A2 write-time supersession).
|
|
@@ -7024,6 +7049,8 @@ declare function deleteVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: stri
|
|
|
7024
7049
|
*
|
|
7025
7050
|
* @param id - the memory being retired (e.g. "Lives in Portland")
|
|
7026
7051
|
* @param supersededById - the newer memory that replaced it (e.g. "Lives in SF")
|
|
7052
|
+
*
|
|
7053
|
+
* @deprecated App code: use `MemoryStore.supersede` (`createLocalMemoryStore`).
|
|
7027
7054
|
*/
|
|
7028
7055
|
declare function supersedeVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string, supersededById: string): Promise<boolean>;
|
|
7029
7056
|
/**
|
|
@@ -7114,6 +7141,8 @@ interface MemoriesNeedingTopicExtraction {
|
|
|
7114
7141
|
* a contradiction only a pre-v42 restore produces, and this is the one place
|
|
7115
7142
|
* that can see all three facts at once, so it clears the flag there (capped by
|
|
7116
7143
|
* `limit`) before returning. See the branch for why that's safe.
|
|
7144
|
+
*
|
|
7145
|
+
* @deprecated App code: use `MemoryStore.maintenance.getTopicBacklog` (`createLocalMemoryStore`).
|
|
7117
7146
|
*/
|
|
7118
7147
|
declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsContext, options?: {
|
|
7119
7148
|
limit?: number;
|
|
@@ -7143,6 +7172,8 @@ declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsC
|
|
|
7143
7172
|
* Callers bound the input via `getMemoriesNeedingTopicExtractionOp`'s `limit`
|
|
7144
7173
|
* (both `pending` and `linkedUnstamped` are capped), so the per-row Model load
|
|
7145
7174
|
* needed to `prepareUpdate` stays bounded and never spikes the RecordCache.
|
|
7175
|
+
*
|
|
7176
|
+
* @deprecated App code: use `MemoryStore.maintenance.stampTopicsExtracted` (`createLocalMemoryStore`).
|
|
7146
7177
|
*/
|
|
7147
7178
|
declare function stampTopicsExtractedAtOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], extractedAt: number, version?: number): Promise<string[]>;
|
|
7148
7179
|
/**
|
|
@@ -7159,6 +7190,8 @@ declare function stampTopicsExtractedAtOp(ctx: VaultMemoryOperationsContext, mem
|
|
|
7159
7190
|
*
|
|
7160
7191
|
* Skips deleted rows, foreign-user rows, and rows with null topics.
|
|
7161
7192
|
* Empty topics remove stale links. Returns the relinked IDs.
|
|
7193
|
+
*
|
|
7194
|
+
* @deprecated App code: use `MemoryStore.maintenance.relinkTopics` (`createLocalMemoryStore`).
|
|
7162
7195
|
*/
|
|
7163
7196
|
declare function relinkMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[]): Promise<string[]>;
|
|
7164
7197
|
/**
|
|
@@ -7183,6 +7216,8 @@ declare function relinkMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryI
|
|
|
7183
7216
|
* per memory (~107 on a single dev launch, sdk#891); it also cost N writes.
|
|
7184
7217
|
* Same treatment as {@link stampTopicsExtractedAtOp}, including its
|
|
7185
7218
|
* transpilation hazard — the prepare pass MUST stay a `.map()`.
|
|
7219
|
+
*
|
|
7220
|
+
* @deprecated App code: use `MemoryStore.maintenance.backfillTopics` (`createLocalMemoryStore`).
|
|
7186
7221
|
*/
|
|
7187
7222
|
declare function backfillMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[]): Promise<string[]>;
|
|
7188
7223
|
declare function deleteAllVaultMemoriesForUserOp(ctx: VaultMemoryOperationsContext, userId: string): Promise<number>;
|
|
@@ -7237,6 +7272,8 @@ declare function getDecayCandidatesRawOp(ctx: VaultMemoryOperationsContext): Pro
|
|
|
7237
7272
|
*
|
|
7238
7273
|
* @returns `true` if this call archived the row; `false` if it was stale
|
|
7239
7274
|
* (deleted / not owned / already archived / refreshed under us).
|
|
7275
|
+
*
|
|
7276
|
+
* @deprecated App code: use `MemoryStore.archive` (`createLocalMemoryStore`).
|
|
7240
7277
|
*/
|
|
7241
7278
|
declare function archiveVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string, opts?: {
|
|
7242
7279
|
/** Timestamp to stamp into `archived_at`. Default `Date.now()`. */
|
|
@@ -7254,6 +7291,8 @@ declare function archiveVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: str
|
|
|
7254
7291
|
*
|
|
7255
7292
|
* @returns `true` if the row was restored (or already active); `false` if it was
|
|
7256
7293
|
* deleted / not owned / missing.
|
|
7294
|
+
*
|
|
7295
|
+
* @deprecated App code: use `MemoryStore.restore` (`createLocalMemoryStore`).
|
|
7257
7296
|
*/
|
|
7258
7297
|
declare function restoreVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: string): Promise<boolean>;
|
|
7259
7298
|
/**
|
|
@@ -9592,6 +9631,397 @@ declare class RerankerUnavailableError extends Error {
|
|
|
9592
9631
|
*/
|
|
9593
9632
|
declare function isRerankerAvailable(): boolean | undefined;
|
|
9594
9633
|
|
|
9634
|
+
/**
|
|
9635
|
+
* Standalone topic (entity) extraction for EXISTING memories.
|
|
9636
|
+
*
|
|
9637
|
+
* The conversation pipeline (autoExtract.ts) assigns entities only to facts it
|
|
9638
|
+
* extracts from a live transcript — manually created, imported, and edited
|
|
9639
|
+
* memories never get LLM topics and used to fall back to a client-side regex.
|
|
9640
|
+
* This module is the LLM half of "continuously LLM-managed topics": a batched
|
|
9641
|
+
* pass that takes memories already in the vault, asks the extraction model for
|
|
9642
|
+
* their named entities, REPLACES their auto-managed links (guarded — a manual
|
|
9643
|
+
* edit or delete always wins), and stamps `topics_extracted_at` so the sweep
|
|
9644
|
+
* query (`getMemoriesNeedingTopicExtractionOp`) only revisits edited memories.
|
|
9645
|
+
*
|
|
9646
|
+
* Batching: memories are classified ~10 per LLM call (mirroring the folder
|
|
9647
|
+
* Auto-Sort harness) with per-memory content truncation, so a whole-vault
|
|
9648
|
+
* backfill or a bulk import costs ceil(n/10) requests, not n.
|
|
9649
|
+
*/
|
|
9650
|
+
|
|
9651
|
+
/** Memories per LLM call. Mirrors the folder Auto-Sort batch size — the cost
|
|
9652
|
+
* lever that makes a whole-vault backfill viable. */
|
|
9653
|
+
declare const TOPIC_EXTRACTION_BATCH_SIZE = 10;
|
|
9654
|
+
/** One memory to extract topics for. `content` must be the DECRYPTED text. */
|
|
9655
|
+
interface TopicExtractionInput {
|
|
9656
|
+
id: string;
|
|
9657
|
+
content: string;
|
|
9658
|
+
}
|
|
9659
|
+
/**
|
|
9660
|
+
* Options for the topic-extraction LLM call. Auth follows the portal dual
|
|
9661
|
+
* pattern — one of `apiKey` / `getToken` is required (see {@link PortalLlmAuth}).
|
|
9662
|
+
*/
|
|
9663
|
+
interface TopicExtractOptions extends PortalLlmAuth {
|
|
9664
|
+
baseUrl?: string;
|
|
9665
|
+
/**
|
|
9666
|
+
* Optional per-call request path override, forwarded to
|
|
9667
|
+
* {@link callPortalJsonCompletion}. When set, topic extraction POSTs to
|
|
9668
|
+
* `baseUrl + endpointOverride` instead of the default
|
|
9669
|
+
* `/api/v1/chat/completions`. The body follows the transport, not the path: a
|
|
9670
|
+
* model that needs the Responses API is moved from a `.../chat/completions`
|
|
9671
|
+
* override to its sibling `.../responses` with a Responses-shaped body. Lets callers route
|
|
9672
|
+
* this internal-utility pass to a dedicated endpoint. Invalid values throw at
|
|
9673
|
+
* call time (see {@link validateEndpointOverride}).
|
|
9674
|
+
*/
|
|
9675
|
+
endpointOverride?: string;
|
|
9676
|
+
/** Defaults to {@link DEFAULT_EXTRACTION_MODEL} — the sanctioned extraction
|
|
9677
|
+
* model. Don't point this at a second model without an eval. */
|
|
9678
|
+
model?: string;
|
|
9679
|
+
/** Override the global fetch implementation (useful for tests). */
|
|
9680
|
+
fetchFn?: typeof fetch;
|
|
9681
|
+
maxAttempts?: number;
|
|
9682
|
+
timeoutMs?: number;
|
|
9683
|
+
totalTimeoutMs?: number;
|
|
9684
|
+
backoffMs?: (attempt: number) => number;
|
|
9685
|
+
/**
|
|
9686
|
+
* The user's existing entity vocabulary (canonical names). Included in the
|
|
9687
|
+
* prompt so independent batches reuse canonical names instead of fragmenting
|
|
9688
|
+
* ("ZetaChain" / "Zetachain" / "zeta chain" as three graph nodes). Truncated
|
|
9689
|
+
* to the first {@link MAX_VOCABULARY_NAMES} names — pass the most-linked
|
|
9690
|
+
* names first.
|
|
9691
|
+
*/
|
|
9692
|
+
existingEntityNames?: readonly string[];
|
|
9693
|
+
/**
|
|
9694
|
+
* When set, PII in memory contents is replaced with tagged placeholders
|
|
9695
|
+
* before the LLM call and returned entity names are de-anonymized (entities
|
|
9696
|
+
* whose placeholders can't be restored are dropped) — mirrors
|
|
9697
|
+
* `ExtractFactsOptions.piiRedaction`. Vault contents hold REAL values, so
|
|
9698
|
+
* callers that redact the conversation pipeline must redact this pass too.
|
|
9699
|
+
*/
|
|
9700
|
+
piiRedaction?: boolean | PiiRedactor;
|
|
9701
|
+
}
|
|
9702
|
+
/**
|
|
9703
|
+
* Ask the extraction LLM for the named entities of each memory, in batches of
|
|
9704
|
+
* {@link TOPIC_EXTRACTION_BATCH_SIZE}. Pure LLM step — no persistence.
|
|
9705
|
+
*
|
|
9706
|
+
* Returns memoryId → entities. A memory PRESENT with an empty array is a
|
|
9707
|
+
* successful, explicit "no named entities" answer; a memory ABSENT from the
|
|
9708
|
+
* map is UNANSWERED — its batch failed after retries, returned an unusable
|
|
9709
|
+
* shape, or the model omitted its id. Callers must retry absent ids in a
|
|
9710
|
+
* later sweep, never stamp them.
|
|
9711
|
+
*/
|
|
9712
|
+
declare function extractEntitiesForMemories(memories: readonly TopicExtractionInput[], options: TopicExtractOptions): Promise<Map<string, ExtractedEntity[]>>;
|
|
9713
|
+
/**
|
|
9714
|
+
* Why one memory was skipped by a topic sweep.
|
|
9715
|
+
*
|
|
9716
|
+
* Split along the line that actually matters operationally — did the sweep
|
|
9717
|
+
* DECLINE this row on purpose, or did something BREAK:
|
|
9718
|
+
*
|
|
9719
|
+
* Deliberate (healthy; a sweep of nothing but these is a success):
|
|
9720
|
+
* - `excluded` — deleted, owned by another user, or `topicsUserManaged`.
|
|
9721
|
+
* - `link-declined` — the entity-link write's in-row guard declined (the row
|
|
9722
|
+
* became user-managed / deleted / absent mid-run).
|
|
9723
|
+
* - `stamp-declined` — same, caught by the stamp op's own re-check.
|
|
9724
|
+
*
|
|
9725
|
+
* Degraded (something is wrong; see {@link isDegradedTopicSkip}):
|
|
9726
|
+
* - `llm-unanswered` — the batch failed or the model omitted this id. THE one
|
|
9727
|
+
* to alarm on: it is how a wholly broken sweep looks.
|
|
9728
|
+
* - `unreadable` — the row could not be loaded/decrypted.
|
|
9729
|
+
* - `not-found` — the lookup threw (absent row or read fault).
|
|
9730
|
+
* - `link-failed` — the entity-link write threw.
|
|
9731
|
+
*
|
|
9732
|
+
* @public
|
|
9733
|
+
*/
|
|
9734
|
+
type TopicSkipReason = "excluded" | "link-declined" | "stamp-declined" | "llm-unanswered" | "unreadable" | "not-found" | "link-failed";
|
|
9735
|
+
/**
|
|
9736
|
+
* Whether a skip reason means the sweep FAILED on that row, rather than
|
|
9737
|
+
* deliberately passing over it.
|
|
9738
|
+
*
|
|
9739
|
+
* Exported so callers classify identically instead of each re-deriving the
|
|
9740
|
+
* split — the reason this type exists is that one wrong grouping turns a broken
|
|
9741
|
+
* sweep back into a healthy-looking one.
|
|
9742
|
+
*
|
|
9743
|
+
* @public
|
|
9744
|
+
*/
|
|
9745
|
+
declare function isDegradedTopicSkip(reason: TopicSkipReason): boolean;
|
|
9746
|
+
/** Outcome of one {@link extractAndLinkEntitiesForMemoriesOp} run. */
|
|
9747
|
+
interface TopicExtractionRunResult {
|
|
9748
|
+
/** memoryId → entities the LLM returned (post-validation, post-linking). */
|
|
9749
|
+
entitiesByMemory: Map<string, ExtractedEntity[]>;
|
|
9750
|
+
/** Memories stamped `topics_extracted_at` this run — includes zero-entity
|
|
9751
|
+
* results so quiet memories aren't re-asked every sweep. */
|
|
9752
|
+
stampedIds: string[];
|
|
9753
|
+
/** Memories NOT processed: missing/deleted/foreign rows, user-managed rows
|
|
9754
|
+
* (including ones that became user-managed mid-run), and members of failed
|
|
9755
|
+
* LLM batches. Skipped ids are not stamped, so failed batches are retried
|
|
9756
|
+
* by a later sweep — callers should apply their own attempt caps. */
|
|
9757
|
+
skippedIds: string[];
|
|
9758
|
+
/**
|
|
9759
|
+
* Why each id in {@link skippedIds} was skipped.
|
|
9760
|
+
*
|
|
9761
|
+
* `skippedIds` alone cannot distinguish a sweep that deliberately declined
|
|
9762
|
+
* work from one that FAILED: a run where every LLM batch errored and a run
|
|
9763
|
+
* over rows the user has taken manual control of produce an identical array.
|
|
9764
|
+
* That is the same blindness `outcome: 'empty-after-retry'` had before #888 —
|
|
9765
|
+
* a degradation wearing the shape of normal control flow.
|
|
9766
|
+
*
|
|
9767
|
+
* It matters here because topics feed the entity recall lane, so a silently
|
|
9768
|
+
* failing sweep means memories that exist but cannot be found by entity, with
|
|
9769
|
+
* nothing in production saying so.
|
|
9770
|
+
*
|
|
9771
|
+
* Populated in lockstep with `skippedIds` (single `skip()` helper), so the two
|
|
9772
|
+
* cannot drift. Group by {@link isDegradedTopicSkip} to separate "declined" from
|
|
9773
|
+
* "broke".
|
|
9774
|
+
*/
|
|
9775
|
+
skippedReasons: Map<string, TopicSkipReason>;
|
|
9776
|
+
}
|
|
9777
|
+
/**
|
|
9778
|
+
* Run LLM topic extraction over existing vault memories and persist the
|
|
9779
|
+
* results: REPLACE each memory's auto-managed entity links with the extracted
|
|
9780
|
+
* set (via {@link replaceMemoryEntitiesGuardedOp} — an edited memory drops the
|
|
9781
|
+
* entities its previous content mentioned) and stamp `topics_extracted_at`.
|
|
9782
|
+
*
|
|
9783
|
+
* User intent is enforced twice: rows already user-managed are skipped up
|
|
9784
|
+
* front, and the replace write re-checks the vault row INSIDE its writer
|
|
9785
|
+
* (user-managed / deleted / absent ⇒ null, and the memory is neither linked
|
|
9786
|
+
* nor stamped) so a manual topic edit or delete landing during the LLM
|
|
9787
|
+
* round-trip wins — a manual edit's own replace semantics also erase anything
|
|
9788
|
+
* this pass linked just before it. The watermark is captured BEFORE contents
|
|
9789
|
+
* are read: an edit landing mid-run keeps `updated_at` > stamp, so the next
|
|
9790
|
+
* sweep re-extracts it rather than trusting this run's stale read.
|
|
9791
|
+
*
|
|
9792
|
+
* Requires `ctx.entityCtx`. Contents are decrypted via the ctx's wallet
|
|
9793
|
+
* fields, exactly like the vault read ops; a memory whose decryption fails is
|
|
9794
|
+
* skipped (retried next sweep), not fatal to the run.
|
|
9795
|
+
*
|
|
9796
|
+
* @deprecated App code: use `MemoryStore.maintenance.extractTopics` (`createLocalMemoryStore`).
|
|
9797
|
+
*/
|
|
9798
|
+
declare function extractAndLinkEntitiesForMemoriesOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], options: TopicExtractOptions & {
|
|
9799
|
+
/** Watermark timestamp (Unix ms) recorded as `topics_extracted_at`.
|
|
9800
|
+
* Defaults to now; tests pass a fixed value. */
|
|
9801
|
+
now?: number;
|
|
9802
|
+
}): Promise<TopicExtractionRunResult>;
|
|
9803
|
+
|
|
9804
|
+
/**
|
|
9805
|
+
* Read filter for {@link MemoryStore.list}. Same semantics as the vault read
|
|
9806
|
+
* ops: every non-visible state (deleted, archived, quarantined, superseded) is
|
|
9807
|
+
* hidden by default and has its own opt-in flag.
|
|
9808
|
+
* @public
|
|
9809
|
+
*/
|
|
9810
|
+
interface MemoryListOptions {
|
|
9811
|
+
scopes?: string[];
|
|
9812
|
+
/** Only memories updated after this instant (results then sort by `updatedAt`). */
|
|
9813
|
+
since?: Date;
|
|
9814
|
+
limit?: number;
|
|
9815
|
+
/** Restrict to these ids. Absent or foreign ids are dropped, never an error. */
|
|
9816
|
+
memoryIds?: string[];
|
|
9817
|
+
factTypes?: string[];
|
|
9818
|
+
/** People Nearby visibility filter; a legacy NULL column reads as "private". */
|
|
9819
|
+
visibility?: VaultMemoryVisibility[];
|
|
9820
|
+
/** Memory Graph "forgotten" nodes — rows carry `isDeleted: true`. */
|
|
9821
|
+
includeDeleted?: boolean;
|
|
9822
|
+
includeArchived?: boolean;
|
|
9823
|
+
includeQuarantined?: boolean;
|
|
9824
|
+
/** Memory history — rows carry `supersededBy`. */
|
|
9825
|
+
includeSuperseded?: boolean;
|
|
9826
|
+
}
|
|
9827
|
+
/**
|
|
9828
|
+
* A manual memory save. Creation uses private visibility, manual provenance
|
|
9829
|
+
* and a proof count of one. Missing embeddings are filled in the background.
|
|
9830
|
+
* Publication uses `setVisibility`; extraction uses `retain`. Migration and
|
|
9831
|
+
* restore use the dedicated lower-level vault/import operations rather than
|
|
9832
|
+
* passing provenance, trust or publication metadata through manual creation.
|
|
9833
|
+
* @public
|
|
9834
|
+
*/
|
|
9835
|
+
type MemoryCreate = Pick<CreateVaultMemoryOptions, "content" | "scope" | "factType" | "eventTime" | "embedding" | "embeddingModel" | "geohash">;
|
|
9836
|
+
/**
|
|
9837
|
+
* The edits an app makes to an existing memory. Deliberately narrower than
|
|
9838
|
+
* {@link UpdateVaultMemoryOptions}: the re-observation knobs (`proofCountIncrement`,
|
|
9839
|
+
* `observationSourceIds`, `preserveUpdatedAt`, `restore`, `lastObservedAt`, …)
|
|
9840
|
+
* belong to `retain()` and backup sync, and an HTTP backend should never have
|
|
9841
|
+
* to accept them from a client. No `folderId` either: vault folders are gone
|
|
9842
|
+
* from the server surface (they leaked across tenants), so a remote backend
|
|
9843
|
+
* could not honour it.
|
|
9844
|
+
*
|
|
9845
|
+
* Omitting `embedding` drops the stored vector (and its model tag) and the
|
|
9846
|
+
* store re-embeds the new content in the background — useChatStorage's edit
|
|
9847
|
+
* behaviour, so an edit never keeps a vector for text that is gone. Pass
|
|
9848
|
+
* `embedding` (with `embeddingModel`) only when you already have the new one.
|
|
9849
|
+
* @public
|
|
9850
|
+
*/
|
|
9851
|
+
type MemoryUpdate = Pick<UpdateVaultMemoryOptions, "content" | "scope" | "factType" | "eventTime" | "embedding" | "embeddingModel">;
|
|
9852
|
+
/**
|
|
9853
|
+
* Fact-only recall. Conversation chunks are message storage, not memory, so
|
|
9854
|
+
* the chunk-lane knobs are not part of this surface; nor is `folderId` (see
|
|
9855
|
+
* {@link MemoryUpdate}).
|
|
9856
|
+
*
|
|
9857
|
+
* DEVICE-LOCAL: `decomposeOptions` (portal credentials) and `onDiagnostics` (a
|
|
9858
|
+
* callback) configure work on the device, including with a remote store.
|
|
9859
|
+
* Query embedding/decomposition and the decrypted recall pipeline stay on the
|
|
9860
|
+
* device. Nearby ranks encrypted rows using embeddings and metadata; credentials
|
|
9861
|
+
* and callbacks are never forwarded to it.
|
|
9862
|
+
* @public
|
|
9863
|
+
*/
|
|
9864
|
+
type MemoryRecallOptions = Omit<RecallOptions, "types" | "includeChunks" | "conversationId" | "excludeConversationId" | "folderId">;
|
|
9865
|
+
/**
|
|
9866
|
+
* `retain()` options minus `folderId` (see {@link MemoryUpdate}).
|
|
9867
|
+
*
|
|
9868
|
+
* DEVICE-LOCAL: `consolidateOptions` carries portal credentials, an `onFallback`
|
|
9869
|
+
* callback and possibly a `PiiRedactor` instance — it configures the
|
|
9870
|
+
* consolidation LLM call on the device. A remote store fetches encrypted
|
|
9871
|
+
* candidates, decrypts and consolidates them on the device, then persists
|
|
9872
|
+
* encrypted results through versioned writes. Nearby holds no decryption key
|
|
9873
|
+
* and never receives these credentials, callbacks or redactor instances.
|
|
9874
|
+
* @public
|
|
9875
|
+
*/
|
|
9876
|
+
type MemoryRetainOptions = Omit<RetainOptions, "folderId">;
|
|
9877
|
+
/** @public */
|
|
9878
|
+
interface MemorySubscribeOptions {
|
|
9879
|
+
/**
|
|
9880
|
+
* Watch the whole table, soft-deleted rows included, and fire on row-SET
|
|
9881
|
+
* changes only (create / delete / undelete) — the Memory Graph's mode. A
|
|
9882
|
+
* column-aware watch would re-fire on every row a decay sweep archives.
|
|
9883
|
+
* Default `false`: watch live rows for user-visible edits and list membership
|
|
9884
|
+
* changes. Background embedding, proof and watermark bookkeeping does not
|
|
9885
|
+
* trigger default notifications.
|
|
9886
|
+
*/
|
|
9887
|
+
includeDeleted?: boolean;
|
|
9888
|
+
/** Also fire when topic (entity / link) state changes. Default `false`. */
|
|
9889
|
+
topics?: boolean;
|
|
9890
|
+
/**
|
|
9891
|
+
* Also fire for embedding vector/model changes. Default `false`.
|
|
9892
|
+
* Ignored when `includeDeleted` is `true`, which remains membership-only.
|
|
9893
|
+
*/
|
|
9894
|
+
embeddings?: boolean;
|
|
9895
|
+
}
|
|
9896
|
+
/**
|
|
9897
|
+
* Background jobs that keep a LOCAL store healthy.
|
|
9898
|
+
*
|
|
9899
|
+
* TRANSITIONAL local-vault plumbing. A remote store may omit these hooks, but
|
|
9900
|
+
* their absence does not mean plaintext-dependent work moves to nearby.
|
|
9901
|
+
* Topic extraction and other jobs that need decrypted memory content remain
|
|
9902
|
+
* on the device and persist encrypted rows/metadata through the remote store.
|
|
9903
|
+
* Metadata-only maintenance can run server-side. Nothing here should gain a
|
|
9904
|
+
* new caller that isn't a background worker.
|
|
9905
|
+
*
|
|
9906
|
+
* Not here on purpose: the client's quality sweep (`list` + `delete`) and
|
|
9907
|
+
* folder→topic migration (`list` + `topicsByMemories` + `addTopics`) compose
|
|
9908
|
+
* from the main interface.
|
|
9909
|
+
* @public
|
|
9910
|
+
*/
|
|
9911
|
+
interface MemoryMaintenance {
|
|
9912
|
+
/** Decay sweeper bound to this store's vault (see `createDecaySweeper`). */
|
|
9913
|
+
createDecaySweeper(options?: Omit<CreateDecaySweeperOptions, "vaultCtx">): DecaySweeper;
|
|
9914
|
+
/** One page of the topic-extraction backlog (see `getMemoriesNeedingTopicExtractionOp`). */
|
|
9915
|
+
getTopicBacklog(options?: {
|
|
9916
|
+
limit?: number;
|
|
9917
|
+
}): Promise<MemoriesNeedingTopicExtraction>;
|
|
9918
|
+
/** LLM topic extraction + link + stamp for these memories. */
|
|
9919
|
+
extractTopics(memoryIds: readonly string[], options: TopicExtractOptions & {
|
|
9920
|
+
now?: number;
|
|
9921
|
+
}): Promise<TopicExtractionRunResult>;
|
|
9922
|
+
/** Grandfather already-linked rows without an LLM call. Returns the ids stamped. */
|
|
9923
|
+
stampTopicsExtracted(memoryIds: readonly string[], extractedAt: number, version?: number): Promise<string[]>;
|
|
9924
|
+
/** Rebuild the local link index from each row's synced `topics`. Returns the ids relinked. */
|
|
9925
|
+
relinkTopics(memoryIds: readonly string[]): Promise<string[]>;
|
|
9926
|
+
/** Fill `topics` on pre-v42 rows from their existing links. Returns the ids filled. */
|
|
9927
|
+
backfillTopics(memoryIds: readonly string[]): Promise<string[]>;
|
|
9928
|
+
}
|
|
9929
|
+
/**
|
|
9930
|
+
* One user's memories, pitched at what the apps do with them rather than at
|
|
9931
|
+
* the storage ops underneath. Two backends are intended: the on-device
|
|
9932
|
+
* WatermelonDB vault ({@link createLocalMemoryStore}) and, later, an HTTP
|
|
9933
|
+
* client for the server-side store.
|
|
9934
|
+
*
|
|
9935
|
+
* Every value crossing this interface is plain data — no WatermelonDB Model,
|
|
9936
|
+
* Query or Collection — so a remote backend can serialize it. The one
|
|
9937
|
+
* exception is the DEVICE-LOCAL LLM-call knobs on {@link MemoryRecallOptions}
|
|
9938
|
+
* and {@link MemoryRetainOptions}, which a remote store uses on the device
|
|
9939
|
+
* rather than forwarding to nearby. Server persistence is authoritative;
|
|
9940
|
+
* content decryption and plaintext-dependent processing remain on the device. Reads are
|
|
9941
|
+
* whole-result rather than per-row so a chat turn costs a handful of calls
|
|
9942
|
+
* (`recall`, then `retain` per fact), not one per memory.
|
|
9943
|
+
*
|
|
9944
|
+
* Writes resolve `null` / `false` for a memory that is missing, deleted or
|
|
9945
|
+
* not owned by this store's user; they don't throw for it.
|
|
9946
|
+
* @public
|
|
9947
|
+
*/
|
|
9948
|
+
interface MemoryStore {
|
|
9949
|
+
/** Memories newest-first, decrypted, WITH `embedding` (Memory Graph edges read it). */
|
|
9950
|
+
list(options?: MemoryListOptions): Promise<StoredVaultMemory[]>;
|
|
9951
|
+
get(id: string): Promise<StoredVaultMemory | null>;
|
|
9952
|
+
/** Decay-archived memories (not deleted, quarantined or superseded), most recently archived first. */
|
|
9953
|
+
listArchived(): Promise<StoredVaultMemory[]>;
|
|
9954
|
+
/** Memory id → which of `names` it is linked to. Names are matched case-insensitively. */
|
|
9955
|
+
memoriesByTopics(names: readonly string[]): Promise<Map<string, Set<string>>>;
|
|
9956
|
+
/** Memory id → its canonical (lowercased) topic names. Unlinked ids are absent. */
|
|
9957
|
+
topicsByMemories(memoryIds: readonly string[]): Promise<Map<string, Set<string>>>;
|
|
9958
|
+
/** Manual save; missing embeddings are filled in the background. */
|
|
9959
|
+
create(input: MemoryCreate): Promise<StoredVaultMemory>;
|
|
9960
|
+
/** One write for a batch of manual saves; migration/restore uses lower-level operations. */
|
|
9961
|
+
createMany(inputs: MemoryCreate[]): Promise<StoredVaultMemory[]>;
|
|
9962
|
+
update(id: string, patch: MemoryUpdate): Promise<StoredVaultMemory | null>;
|
|
9963
|
+
/** Soft delete; also drops the memory's topic links. */
|
|
9964
|
+
delete(id: string): Promise<boolean>;
|
|
9965
|
+
/** Retire `id` behind the newer `supersededById` (both must be live and owned). */
|
|
9966
|
+
supersede(id: string, supersededById: string): Promise<boolean>;
|
|
9967
|
+
archive(id: string): Promise<boolean>;
|
|
9968
|
+
restore(id: string): Promise<boolean>;
|
|
9969
|
+
/** Replace the memory's topics with a user-chosen set and stop auto-tagging it. */
|
|
9970
|
+
setTopics(memoryId: string, topics: readonly EntityInput[]): Promise<StoredVaultMemory | null>;
|
|
9971
|
+
/** Add topics alongside the existing ones (auto-tagging stays on). */
|
|
9972
|
+
addTopics(memoryId: string, topics: readonly EntityInput[]): Promise<StoredEntity[]>;
|
|
9973
|
+
setVisibility(id: string, visibility: VaultMemoryVisibility, options?: {
|
|
9974
|
+
twinOptIn?: boolean;
|
|
9975
|
+
}): Promise<StoredVaultMemory | null>;
|
|
9976
|
+
recall(query: string, options?: MemoryRecallOptions): Promise<RecallResult>;
|
|
9977
|
+
retain(content: string, options?: MemoryRetainOptions): Promise<RetainResult>;
|
|
9978
|
+
/**
|
|
9979
|
+
* Call `onChange` after the store's memories change; re-read to see what
|
|
9980
|
+
* changed. Does not fire for the state at subscription time — read once
|
|
9981
|
+
* after subscribing. Returns the unsubscribe function.
|
|
9982
|
+
*/
|
|
9983
|
+
subscribe(onChange: () => void, options?: MemorySubscribeOptions): () => void;
|
|
9984
|
+
/** TRANSITIONAL — see {@link MemoryMaintenance}. Absent on a remote backend. */
|
|
9985
|
+
maintenance?: MemoryMaintenance;
|
|
9986
|
+
}
|
|
9987
|
+
|
|
9988
|
+
/** @public */
|
|
9989
|
+
interface LocalMemoryStoreOptions {
|
|
9990
|
+
/** A database built from `sdkSchema` (memory_vault + entity + memory_entity). */
|
|
9991
|
+
database: Database;
|
|
9992
|
+
/** With `signMessage`, encrypts content on write and decrypts on read. */
|
|
9993
|
+
walletAddress?: string;
|
|
9994
|
+
signMessage?: SignMessageFn;
|
|
9995
|
+
embeddedWalletSigner?: EmbeddedWalletSignerFn;
|
|
9996
|
+
/**
|
|
9997
|
+
* Scope every read/write to this user — for a shared, multi-tenant database
|
|
9998
|
+
* whose rows all carry their `user_id`. Rows with no `user_id` are invisible
|
|
9999
|
+
* to a scoped store, so the per-wallet client DBs (every useChatStorage row is
|
|
10000
|
+
* `user_id = null`) use `singleTenant` instead, exactly like useChatStorage's
|
|
10001
|
+
* vault ctx.
|
|
10002
|
+
*/
|
|
10003
|
+
userId?: string;
|
|
10004
|
+
/**
|
|
10005
|
+
* The database holds exactly one owner's rows (the per-wallet client DBs).
|
|
10006
|
+
* Required for the decay sweep to run without `userId` — see
|
|
10007
|
+
* `VaultMemoryOperationsContext.singleTenant`.
|
|
10008
|
+
*/
|
|
10009
|
+
singleTenant?: boolean;
|
|
10010
|
+
/** Admit pre-v31 `user_id = null` link rows alongside `userId`'s (LokiJS web). */
|
|
10011
|
+
allowUnscopedRows?: boolean;
|
|
10012
|
+
/** Embedding API options for `recall` / `retain`. */
|
|
10013
|
+
embeddingOptions: EmbeddingOptions;
|
|
10014
|
+
/** Share a warm cache with other recall surfaces; one is created when omitted. */
|
|
10015
|
+
vaultCache?: VaultEmbeddingCache;
|
|
10016
|
+
}
|
|
10017
|
+
/**
|
|
10018
|
+
* {@link MemoryStore} over the on-device WatermelonDB vault. Builds the vault +
|
|
10019
|
+
* entity contexts once and delegates every method to the existing ops, so
|
|
10020
|
+
* behavior is exactly theirs.
|
|
10021
|
+
* @public
|
|
10022
|
+
*/
|
|
10023
|
+
declare function createLocalMemoryStore(options: LocalMemoryStoreOptions): MemoryStore;
|
|
10024
|
+
|
|
9595
10025
|
/**
|
|
9596
10026
|
* synthesizeProfile — client-side profile synthesis for People Nearby (C1).
|
|
9597
10027
|
*
|
|
@@ -9776,174 +10206,6 @@ interface SynthesizeProfileOptions extends PortalLlmAuth {
|
|
|
9776
10206
|
*/
|
|
9777
10207
|
declare function synthesizeProfile(ctx: RecallContext, options?: SynthesizeProfileOptions): Promise<ProfileDoc>;
|
|
9778
10208
|
|
|
9779
|
-
/**
|
|
9780
|
-
* Standalone topic (entity) extraction for EXISTING memories.
|
|
9781
|
-
*
|
|
9782
|
-
* The conversation pipeline (autoExtract.ts) assigns entities only to facts it
|
|
9783
|
-
* extracts from a live transcript — manually created, imported, and edited
|
|
9784
|
-
* memories never get LLM topics and used to fall back to a client-side regex.
|
|
9785
|
-
* This module is the LLM half of "continuously LLM-managed topics": a batched
|
|
9786
|
-
* pass that takes memories already in the vault, asks the extraction model for
|
|
9787
|
-
* their named entities, REPLACES their auto-managed links (guarded — a manual
|
|
9788
|
-
* edit or delete always wins), and stamps `topics_extracted_at` so the sweep
|
|
9789
|
-
* query (`getMemoriesNeedingTopicExtractionOp`) only revisits edited memories.
|
|
9790
|
-
*
|
|
9791
|
-
* Batching: memories are classified ~10 per LLM call (mirroring the folder
|
|
9792
|
-
* Auto-Sort harness) with per-memory content truncation, so a whole-vault
|
|
9793
|
-
* backfill or a bulk import costs ceil(n/10) requests, not n.
|
|
9794
|
-
*/
|
|
9795
|
-
|
|
9796
|
-
/** Memories per LLM call. Mirrors the folder Auto-Sort batch size — the cost
|
|
9797
|
-
* lever that makes a whole-vault backfill viable. */
|
|
9798
|
-
declare const TOPIC_EXTRACTION_BATCH_SIZE = 10;
|
|
9799
|
-
/** One memory to extract topics for. `content` must be the DECRYPTED text. */
|
|
9800
|
-
interface TopicExtractionInput {
|
|
9801
|
-
id: string;
|
|
9802
|
-
content: string;
|
|
9803
|
-
}
|
|
9804
|
-
/**
|
|
9805
|
-
* Options for the topic-extraction LLM call. Auth follows the portal dual
|
|
9806
|
-
* pattern — one of `apiKey` / `getToken` is required (see {@link PortalLlmAuth}).
|
|
9807
|
-
*/
|
|
9808
|
-
interface TopicExtractOptions extends PortalLlmAuth {
|
|
9809
|
-
baseUrl?: string;
|
|
9810
|
-
/**
|
|
9811
|
-
* Optional per-call request path override, forwarded to
|
|
9812
|
-
* {@link callPortalJsonCompletion}. When set, topic extraction POSTs to
|
|
9813
|
-
* `baseUrl + endpointOverride` instead of the default
|
|
9814
|
-
* `/api/v1/chat/completions`. The body follows the transport, not the path: a
|
|
9815
|
-
* model that needs the Responses API is moved from a `.../chat/completions`
|
|
9816
|
-
* override to its sibling `.../responses` with a Responses-shaped body. Lets callers route
|
|
9817
|
-
* this internal-utility pass to a dedicated endpoint. Invalid values throw at
|
|
9818
|
-
* call time (see {@link validateEndpointOverride}).
|
|
9819
|
-
*/
|
|
9820
|
-
endpointOverride?: string;
|
|
9821
|
-
/** Defaults to {@link DEFAULT_EXTRACTION_MODEL} — the sanctioned extraction
|
|
9822
|
-
* model. Don't point this at a second model without an eval. */
|
|
9823
|
-
model?: string;
|
|
9824
|
-
/** Override the global fetch implementation (useful for tests). */
|
|
9825
|
-
fetchFn?: typeof fetch;
|
|
9826
|
-
maxAttempts?: number;
|
|
9827
|
-
timeoutMs?: number;
|
|
9828
|
-
totalTimeoutMs?: number;
|
|
9829
|
-
backoffMs?: (attempt: number) => number;
|
|
9830
|
-
/**
|
|
9831
|
-
* The user's existing entity vocabulary (canonical names). Included in the
|
|
9832
|
-
* prompt so independent batches reuse canonical names instead of fragmenting
|
|
9833
|
-
* ("ZetaChain" / "Zetachain" / "zeta chain" as three graph nodes). Truncated
|
|
9834
|
-
* to the first {@link MAX_VOCABULARY_NAMES} names — pass the most-linked
|
|
9835
|
-
* names first.
|
|
9836
|
-
*/
|
|
9837
|
-
existingEntityNames?: readonly string[];
|
|
9838
|
-
/**
|
|
9839
|
-
* When set, PII in memory contents is replaced with tagged placeholders
|
|
9840
|
-
* before the LLM call and returned entity names are de-anonymized (entities
|
|
9841
|
-
* whose placeholders can't be restored are dropped) — mirrors
|
|
9842
|
-
* `ExtractFactsOptions.piiRedaction`. Vault contents hold REAL values, so
|
|
9843
|
-
* callers that redact the conversation pipeline must redact this pass too.
|
|
9844
|
-
*/
|
|
9845
|
-
piiRedaction?: boolean | PiiRedactor;
|
|
9846
|
-
}
|
|
9847
|
-
/**
|
|
9848
|
-
* Ask the extraction LLM for the named entities of each memory, in batches of
|
|
9849
|
-
* {@link TOPIC_EXTRACTION_BATCH_SIZE}. Pure LLM step — no persistence.
|
|
9850
|
-
*
|
|
9851
|
-
* Returns memoryId → entities. A memory PRESENT with an empty array is a
|
|
9852
|
-
* successful, explicit "no named entities" answer; a memory ABSENT from the
|
|
9853
|
-
* map is UNANSWERED — its batch failed after retries, returned an unusable
|
|
9854
|
-
* shape, or the model omitted its id. Callers must retry absent ids in a
|
|
9855
|
-
* later sweep, never stamp them.
|
|
9856
|
-
*/
|
|
9857
|
-
declare function extractEntitiesForMemories(memories: readonly TopicExtractionInput[], options: TopicExtractOptions): Promise<Map<string, ExtractedEntity[]>>;
|
|
9858
|
-
/**
|
|
9859
|
-
* Why one memory was skipped by a topic sweep.
|
|
9860
|
-
*
|
|
9861
|
-
* Split along the line that actually matters operationally — did the sweep
|
|
9862
|
-
* DECLINE this row on purpose, or did something BREAK:
|
|
9863
|
-
*
|
|
9864
|
-
* Deliberate (healthy; a sweep of nothing but these is a success):
|
|
9865
|
-
* - `excluded` — deleted, owned by another user, or `topicsUserManaged`.
|
|
9866
|
-
* - `link-declined` — the entity-link write's in-row guard declined (the row
|
|
9867
|
-
* became user-managed / deleted / absent mid-run).
|
|
9868
|
-
* - `stamp-declined` — same, caught by the stamp op's own re-check.
|
|
9869
|
-
*
|
|
9870
|
-
* Degraded (something is wrong; see {@link isDegradedTopicSkip}):
|
|
9871
|
-
* - `llm-unanswered` — the batch failed or the model omitted this id. THE one
|
|
9872
|
-
* to alarm on: it is how a wholly broken sweep looks.
|
|
9873
|
-
* - `unreadable` — the row could not be loaded/decrypted.
|
|
9874
|
-
* - `not-found` — the lookup threw (absent row or read fault).
|
|
9875
|
-
* - `link-failed` — the entity-link write threw.
|
|
9876
|
-
*
|
|
9877
|
-
* @public
|
|
9878
|
-
*/
|
|
9879
|
-
type TopicSkipReason = "excluded" | "link-declined" | "stamp-declined" | "llm-unanswered" | "unreadable" | "not-found" | "link-failed";
|
|
9880
|
-
/**
|
|
9881
|
-
* Whether a skip reason means the sweep FAILED on that row, rather than
|
|
9882
|
-
* deliberately passing over it.
|
|
9883
|
-
*
|
|
9884
|
-
* Exported so callers classify identically instead of each re-deriving the
|
|
9885
|
-
* split — the reason this type exists is that one wrong grouping turns a broken
|
|
9886
|
-
* sweep back into a healthy-looking one.
|
|
9887
|
-
*
|
|
9888
|
-
* @public
|
|
9889
|
-
*/
|
|
9890
|
-
declare function isDegradedTopicSkip(reason: TopicSkipReason): boolean;
|
|
9891
|
-
/** Outcome of one {@link extractAndLinkEntitiesForMemoriesOp} run. */
|
|
9892
|
-
interface TopicExtractionRunResult {
|
|
9893
|
-
/** memoryId → entities the LLM returned (post-validation, post-linking). */
|
|
9894
|
-
entitiesByMemory: Map<string, ExtractedEntity[]>;
|
|
9895
|
-
/** Memories stamped `topics_extracted_at` this run — includes zero-entity
|
|
9896
|
-
* results so quiet memories aren't re-asked every sweep. */
|
|
9897
|
-
stampedIds: string[];
|
|
9898
|
-
/** Memories NOT processed: missing/deleted/foreign rows, user-managed rows
|
|
9899
|
-
* (including ones that became user-managed mid-run), and members of failed
|
|
9900
|
-
* LLM batches. Skipped ids are not stamped, so failed batches are retried
|
|
9901
|
-
* by a later sweep — callers should apply their own attempt caps. */
|
|
9902
|
-
skippedIds: string[];
|
|
9903
|
-
/**
|
|
9904
|
-
* Why each id in {@link skippedIds} was skipped.
|
|
9905
|
-
*
|
|
9906
|
-
* `skippedIds` alone cannot distinguish a sweep that deliberately declined
|
|
9907
|
-
* work from one that FAILED: a run where every LLM batch errored and a run
|
|
9908
|
-
* over rows the user has taken manual control of produce an identical array.
|
|
9909
|
-
* That is the same blindness `outcome: 'empty-after-retry'` had before #888 —
|
|
9910
|
-
* a degradation wearing the shape of normal control flow.
|
|
9911
|
-
*
|
|
9912
|
-
* It matters here because topics feed the entity recall lane, so a silently
|
|
9913
|
-
* failing sweep means memories that exist but cannot be found by entity, with
|
|
9914
|
-
* nothing in production saying so.
|
|
9915
|
-
*
|
|
9916
|
-
* Populated in lockstep with `skippedIds` (single `skip()` helper), so the two
|
|
9917
|
-
* cannot drift. Group by {@link isDegradedTopicSkip} to separate "declined" from
|
|
9918
|
-
* "broke".
|
|
9919
|
-
*/
|
|
9920
|
-
skippedReasons: Map<string, TopicSkipReason>;
|
|
9921
|
-
}
|
|
9922
|
-
/**
|
|
9923
|
-
* Run LLM topic extraction over existing vault memories and persist the
|
|
9924
|
-
* results: REPLACE each memory's auto-managed entity links with the extracted
|
|
9925
|
-
* set (via {@link replaceMemoryEntitiesGuardedOp} — an edited memory drops the
|
|
9926
|
-
* entities its previous content mentioned) and stamp `topics_extracted_at`.
|
|
9927
|
-
*
|
|
9928
|
-
* User intent is enforced twice: rows already user-managed are skipped up
|
|
9929
|
-
* front, and the replace write re-checks the vault row INSIDE its writer
|
|
9930
|
-
* (user-managed / deleted / absent ⇒ null, and the memory is neither linked
|
|
9931
|
-
* nor stamped) so a manual topic edit or delete landing during the LLM
|
|
9932
|
-
* round-trip wins — a manual edit's own replace semantics also erase anything
|
|
9933
|
-
* this pass linked just before it. The watermark is captured BEFORE contents
|
|
9934
|
-
* are read: an edit landing mid-run keeps `updated_at` > stamp, so the next
|
|
9935
|
-
* sweep re-extracts it rather than trusting this run's stale read.
|
|
9936
|
-
*
|
|
9937
|
-
* Requires `ctx.entityCtx`. Contents are decrypted via the ctx's wallet
|
|
9938
|
-
* fields, exactly like the vault read ops; a memory whose decryption fails is
|
|
9939
|
-
* skipped (retried next sweep), not fatal to the run.
|
|
9940
|
-
*/
|
|
9941
|
-
declare function extractAndLinkEntitiesForMemoriesOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], options: TopicExtractOptions & {
|
|
9942
|
-
/** Watermark timestamp (Unix ms) recorded as `topics_extracted_at`.
|
|
9943
|
-
* Defaults to now; tests pass a fixed value. */
|
|
9944
|
-
now?: number;
|
|
9945
|
-
}): Promise<TopicExtractionRunResult>;
|
|
9946
|
-
|
|
9947
10209
|
/**
|
|
9948
10210
|
* Post-hoc support verification for extracted memories (#707).
|
|
9949
10211
|
*
|
|
@@ -11345,4 +11607,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
11345
11607
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
11346
11608
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
11347
11609
|
|
|
11348
|
-
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 ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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 MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, 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 PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, 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 PublishedPhotoMemory, 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 RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, 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 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 TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, 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, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, 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, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
|
11610
|
+
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 ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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, type LocalMemoryStoreOptions, 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 MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, 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 PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, 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 PublishedPhotoMemory, 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 RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, 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 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 TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, 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, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, 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, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|