@anuma/sdk 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expo/{chunk-A26RBLTJ.mjs → chunk-TCRDSUC6.mjs} +11 -3
- package/dist/expo/index.cjs +34 -5
- package/dist/expo/index.d.mts +35 -12
- package/dist/expo/index.d.ts +35 -12
- package/dist/expo/index.mjs +25 -3
- package/dist/expo/{recall-JC5GF5CX.mjs → recall-FQU3NUTL.mjs} +1 -1
- package/dist/react/{chunk-V5GC3ES7.mjs → chunk-ZXS3KOY4.mjs} +15 -4
- package/dist/react/index.cjs +38 -6
- package/dist/react/index.d.mts +43 -15
- package/dist/react/index.d.ts +43 -15
- package/dist/react/index.mjs +25 -3
- package/dist/react/{recall-IRTSMKYI.mjs → recall-PV7L3SN3.mjs} +1 -1
- package/dist/server/{chunk-TWWLE6P3.mjs → chunk-Z6II54I7.mjs} +11 -3
- package/dist/server/index.cjs +34 -5
- package/dist/server/index.d.mts +35 -12
- package/dist/server/index.d.ts +35 -12
- package/dist/server/index.mjs +25 -3
- package/dist/server/{recall-44FIK2MJ.mjs → recall-CQT24XLH.mjs} +1 -1
- package/package.json +1 -1
|
@@ -16098,6 +16098,7 @@ function vaultMemoryToStoredRaw(memory) {
|
|
|
16098
16098
|
eventTimeKind: memory.eventTimeKind ?? null,
|
|
16099
16099
|
topicsUserManaged: memory.topicsUserManaged ?? false,
|
|
16100
16100
|
topicsExtractedAt: memory.topicsExtractedAt ?? null,
|
|
16101
|
+
topicsExtractedVersion: memory.topicsExtractedVersion ?? null,
|
|
16101
16102
|
supersededBy: memory.supersededBy ?? null,
|
|
16102
16103
|
supersededAt: memory.supersededAt ?? null,
|
|
16103
16104
|
createdAt: memory.createdAt,
|
|
@@ -16337,6 +16338,7 @@ function vaultMemoryRawToStoredRaw(raw) {
|
|
|
16337
16338
|
// SQLite stores booleans as 0/1, LokiJS as true/false — coerce both.
|
|
16338
16339
|
topicsUserManaged: raw.topics_user_managed === true || raw.topics_user_managed === 1,
|
|
16339
16340
|
topicsExtractedAt: raw.topics_extracted_at ?? null,
|
|
16341
|
+
topicsExtractedVersion: raw.topics_extracted_version ?? null,
|
|
16340
16342
|
supersededBy: raw.superseded_by ?? null,
|
|
16341
16343
|
supersededAt: raw.superseded_at ?? null,
|
|
16342
16344
|
createdAt: new Date(raw.created_at),
|
|
@@ -16515,6 +16517,7 @@ async function getUnfiledVaultMemoriesOp(ctx) {
|
|
|
16515
16517
|
(record) => vaultMemoryToStored(record, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner)
|
|
16516
16518
|
);
|
|
16517
16519
|
}
|
|
16520
|
+
var TOPICS_EXTRACTION_VERSION = 1;
|
|
16518
16521
|
async function getMemoriesNeedingTopicExtractionOp(ctx, options) {
|
|
16519
16522
|
const entityCtx = ctx.entityCtx;
|
|
16520
16523
|
if (!entityCtx) {
|
|
@@ -16533,7 +16536,10 @@ async function getMemoriesNeedingTopicExtractionOp(ctx, options) {
|
|
|
16533
16536
|
for (const raw of rows) {
|
|
16534
16537
|
const stamp = raw.topics_extracted_at ?? null;
|
|
16535
16538
|
if (stamp !== null) {
|
|
16536
|
-
|
|
16539
|
+
const version = raw.topics_extracted_version ?? 0;
|
|
16540
|
+
if (raw.updated_at > stamp || version < TOPICS_EXTRACTION_VERSION) {
|
|
16541
|
+
stampedPending.push(raw);
|
|
16542
|
+
}
|
|
16537
16543
|
} else {
|
|
16538
16544
|
unstamped.push(raw);
|
|
16539
16545
|
}
|
|
@@ -16563,7 +16569,7 @@ async function getMemoriesNeedingTopicExtractionOp(ctx, options) {
|
|
|
16563
16569
|
);
|
|
16564
16570
|
return { pending, linkedUnstamped };
|
|
16565
16571
|
}
|
|
16566
|
-
async function stampTopicsExtractedAtOp(ctx, memoryIds, extractedAt) {
|
|
16572
|
+
async function stampTopicsExtractedAtOp(ctx, memoryIds, extractedAt, version = TOPICS_EXTRACTION_VERSION) {
|
|
16567
16573
|
if (memoryIds.length === 0) return [];
|
|
16568
16574
|
const uniqueIds = Array.from(new Set(memoryIds));
|
|
16569
16575
|
const CHUNK = 500;
|
|
@@ -16586,6 +16592,7 @@ async function stampTopicsExtractedAtOp(ctx, memoryIds, extractedAt) {
|
|
|
16586
16592
|
prepared.push(
|
|
16587
16593
|
record.prepareUpdate((r) => {
|
|
16588
16594
|
r._setRaw("topics_extracted_at", extractedAt);
|
|
16595
|
+
r._setRaw("topics_extracted_version", version);
|
|
16589
16596
|
r._setRaw("updated_at", originalUpdatedAt);
|
|
16590
16597
|
})
|
|
16591
16598
|
);
|
|
@@ -19200,7 +19207,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
19200
19207
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
19201
19208
|
);
|
|
19202
19209
|
}
|
|
19203
|
-
const { recall: recall2 } = await import("./recall-
|
|
19210
|
+
const { recall: recall2 } = await import("./recall-CQT24XLH.mjs");
|
|
19204
19211
|
const result = await recall2(
|
|
19205
19212
|
query,
|
|
19206
19213
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
|
@@ -19898,6 +19905,7 @@ export {
|
|
|
19898
19905
|
deleteVaultMemoryOp,
|
|
19899
19906
|
supersedeVaultMemoryOp,
|
|
19900
19907
|
getUnfiledVaultMemoriesOp,
|
|
19908
|
+
TOPICS_EXTRACTION_VERSION,
|
|
19901
19909
|
getMemoriesNeedingTopicExtractionOp,
|
|
19902
19910
|
stampTopicsExtractedAtOp,
|
|
19903
19911
|
deleteAllVaultMemoriesForUserOp,
|
package/dist/server/index.cjs
CHANGED
|
@@ -16905,6 +16905,7 @@ function vaultMemoryToStoredRaw(memory) {
|
|
|
16905
16905
|
eventTimeKind: memory.eventTimeKind ?? null,
|
|
16906
16906
|
topicsUserManaged: memory.topicsUserManaged ?? false,
|
|
16907
16907
|
topicsExtractedAt: memory.topicsExtractedAt ?? null,
|
|
16908
|
+
topicsExtractedVersion: memory.topicsExtractedVersion ?? null,
|
|
16908
16909
|
supersededBy: memory.supersededBy ?? null,
|
|
16909
16910
|
supersededAt: memory.supersededAt ?? null,
|
|
16910
16911
|
createdAt: memory.createdAt,
|
|
@@ -17144,6 +17145,7 @@ function vaultMemoryRawToStoredRaw(raw) {
|
|
|
17144
17145
|
// SQLite stores booleans as 0/1, LokiJS as true/false — coerce both.
|
|
17145
17146
|
topicsUserManaged: raw.topics_user_managed === true || raw.topics_user_managed === 1,
|
|
17146
17147
|
topicsExtractedAt: raw.topics_extracted_at ?? null,
|
|
17148
|
+
topicsExtractedVersion: raw.topics_extracted_version ?? null,
|
|
17147
17149
|
supersededBy: raw.superseded_by ?? null,
|
|
17148
17150
|
supersededAt: raw.superseded_at ?? null,
|
|
17149
17151
|
createdAt: new Date(raw.created_at),
|
|
@@ -17340,7 +17342,10 @@ async function getMemoriesNeedingTopicExtractionOp(ctx, options) {
|
|
|
17340
17342
|
for (const raw of rows) {
|
|
17341
17343
|
const stamp = raw.topics_extracted_at ?? null;
|
|
17342
17344
|
if (stamp !== null) {
|
|
17343
|
-
|
|
17345
|
+
const version = raw.topics_extracted_version ?? 0;
|
|
17346
|
+
if (raw.updated_at > stamp || version < TOPICS_EXTRACTION_VERSION) {
|
|
17347
|
+
stampedPending.push(raw);
|
|
17348
|
+
}
|
|
17344
17349
|
} else {
|
|
17345
17350
|
unstamped.push(raw);
|
|
17346
17351
|
}
|
|
@@ -17370,7 +17375,7 @@ async function getMemoriesNeedingTopicExtractionOp(ctx, options) {
|
|
|
17370
17375
|
);
|
|
17371
17376
|
return { pending, linkedUnstamped };
|
|
17372
17377
|
}
|
|
17373
|
-
async function stampTopicsExtractedAtOp(ctx, memoryIds, extractedAt) {
|
|
17378
|
+
async function stampTopicsExtractedAtOp(ctx, memoryIds, extractedAt, version = TOPICS_EXTRACTION_VERSION) {
|
|
17374
17379
|
if (memoryIds.length === 0) return [];
|
|
17375
17380
|
const uniqueIds = Array.from(new Set(memoryIds));
|
|
17376
17381
|
const CHUNK = 500;
|
|
@@ -17393,6 +17398,7 @@ async function stampTopicsExtractedAtOp(ctx, memoryIds, extractedAt) {
|
|
|
17393
17398
|
prepared.push(
|
|
17394
17399
|
record.prepareUpdate((r) => {
|
|
17395
17400
|
r._setRaw("topics_extracted_at", extractedAt);
|
|
17401
|
+
r._setRaw("topics_extracted_version", version);
|
|
17396
17402
|
r._setRaw("updated_at", originalUpdatedAt);
|
|
17397
17403
|
})
|
|
17398
17404
|
);
|
|
@@ -17445,13 +17451,14 @@ async function updateVaultMemoryEmbeddingOp(ctx, id, embedding, embeddingModel)
|
|
|
17445
17451
|
return false;
|
|
17446
17452
|
}
|
|
17447
17453
|
}
|
|
17448
|
-
var import_watermelondb17;
|
|
17454
|
+
var import_watermelondb17, TOPICS_EXTRACTION_VERSION;
|
|
17449
17455
|
var init_operations3 = __esm({
|
|
17450
17456
|
"src/lib/db/memoryVault/operations.ts"() {
|
|
17451
17457
|
"use strict";
|
|
17452
17458
|
import_watermelondb17 = __toESM(require_watermelondb());
|
|
17453
17459
|
init_operations2();
|
|
17454
17460
|
init_encryption2();
|
|
17461
|
+
TOPICS_EXTRACTION_VERSION = 1;
|
|
17455
17462
|
}
|
|
17456
17463
|
});
|
|
17457
17464
|
|
|
@@ -21887,6 +21894,7 @@ __export(index_exports, {
|
|
|
21887
21894
|
STREAM_RESUMABLE_HEADER: () => STREAM_RESUMABLE_HEADER,
|
|
21888
21895
|
StreamExpiredError: () => StreamExpiredError,
|
|
21889
21896
|
TOOL_CATALOG: () => TOOL_CATALOG,
|
|
21897
|
+
TOPICS_EXTRACTION_VERSION: () => TOPICS_EXTRACTION_VERSION,
|
|
21890
21898
|
TOPIC_EXTRACTION_BATCH_SIZE: () => TOPIC_EXTRACTION_BATCH_SIZE,
|
|
21891
21899
|
TextProcessor: () => TextProcessor,
|
|
21892
21900
|
UserPreference: () => UserPreference,
|
|
@@ -22434,6 +22442,9 @@ __decorateClass([
|
|
|
22434
22442
|
__decorateClass([
|
|
22435
22443
|
(0, import_decorators6.field)("superseded_at")
|
|
22436
22444
|
], VaultMemory.prototype, "supersededAt", 2);
|
|
22445
|
+
__decorateClass([
|
|
22446
|
+
(0, import_decorators6.field)("topics_extracted_version")
|
|
22447
|
+
], VaultMemory.prototype, "topicsExtractedVersion", 2);
|
|
22437
22448
|
__decorateClass([
|
|
22438
22449
|
import_decorators6.readonly,
|
|
22439
22450
|
(0, import_decorators6.date)("created_at")
|
|
@@ -22581,7 +22592,7 @@ __decorateClass([
|
|
|
22581
22592
|
], VaultFolder.prototype, "context", 2);
|
|
22582
22593
|
|
|
22583
22594
|
// src/lib/db/schema.ts
|
|
22584
|
-
var SDK_SCHEMA_VERSION =
|
|
22595
|
+
var SDK_SCHEMA_VERSION = 38;
|
|
22585
22596
|
var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
22586
22597
|
version: SDK_SCHEMA_VERSION,
|
|
22587
22598
|
tables: [
|
|
@@ -22715,7 +22726,11 @@ var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
|
22715
22726
|
// and dedup by default. Null = live (not superseded). Indexed so the
|
|
22716
22727
|
// recall filter stays cheap.
|
|
22717
22728
|
{ name: "superseded_by", type: "string", isOptional: true, isIndexed: true },
|
|
22718
|
-
{ name: "superseded_at", type: "number", isOptional: true }
|
|
22729
|
+
{ name: "superseded_at", type: "number", isOptional: true },
|
|
22730
|
+
// The extraction-logic version this memory was last stamped under. Null
|
|
22731
|
+
// (pre-v38) is treated as version 0, so a bump of TOPICS_EXTRACTION_VERSION
|
|
22732
|
+
// re-extracts stale rows. See getMemoriesNeedingTopicExtractionOp.
|
|
22733
|
+
{ name: "topics_extracted_version", type: "number", isOptional: true }
|
|
22719
22734
|
]
|
|
22720
22735
|
}),
|
|
22721
22736
|
// Entity table — canonical names extracted from auto-extraction (W5).
|
|
@@ -23341,6 +23356,19 @@ var sdkMigrations = (0, import_migrations.schemaMigrations)({
|
|
|
23341
23356
|
]
|
|
23342
23357
|
})
|
|
23343
23358
|
]
|
|
23359
|
+
},
|
|
23360
|
+
// v37 -> v38: topics_extracted_version on memory_vault. Existing rows keep it
|
|
23361
|
+
// NULL, read as version 0 by getMemoriesNeedingTopicExtractionOp — so the
|
|
23362
|
+
// first sweep after a TOPICS_EXTRACTION_VERSION bump re-extracts them (drained
|
|
23363
|
+
// across sweeps by the worker's limit). See topicExtract.ts.
|
|
23364
|
+
{
|
|
23365
|
+
toVersion: 38,
|
|
23366
|
+
steps: [
|
|
23367
|
+
(0, import_migrations.addColumns)({
|
|
23368
|
+
table: "memory_vault",
|
|
23369
|
+
columns: [{ name: "topics_extracted_version", type: "number", isOptional: true }]
|
|
23370
|
+
})
|
|
23371
|
+
]
|
|
23344
23372
|
}
|
|
23345
23373
|
]
|
|
23346
23374
|
});
|
|
@@ -32866,6 +32894,7 @@ function buildSystemPrompt(ctx, options) {
|
|
|
32866
32894
|
STREAM_RESUMABLE_HEADER,
|
|
32867
32895
|
StreamExpiredError,
|
|
32868
32896
|
TOOL_CATALOG,
|
|
32897
|
+
TOPICS_EXTRACTION_VERSION,
|
|
32869
32898
|
TOPIC_EXTRACTION_BATCH_SIZE,
|
|
32870
32899
|
TextProcessor,
|
|
32871
32900
|
UserPreference,
|
package/dist/server/index.d.mts
CHANGED
|
@@ -57,8 +57,12 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
|
|
|
57
57
|
* write-time supersession — a changed fact retires the stale one (points at
|
|
58
58
|
* the newer memory) instead of both surviving; superseded rows are excluded
|
|
59
59
|
* from recall/dedup by default
|
|
60
|
+
* - v38: Added topics_extracted_version column to memory_vault — the extraction
|
|
61
|
+
* logic version a memory was last stamped under. Bumping TOPICS_EXTRACTION_VERSION
|
|
62
|
+
* (new prompt/model) makes the worker re-extract every row whose stored version
|
|
63
|
+
* is behind, so topic-quality improvements propagate across the existing vault
|
|
60
64
|
*/
|
|
61
|
-
declare const SDK_SCHEMA_VERSION =
|
|
65
|
+
declare const SDK_SCHEMA_VERSION = 38;
|
|
62
66
|
/**
|
|
63
67
|
* Combined WatermelonDB schema for all SDK storage modules.
|
|
64
68
|
*
|
|
@@ -4150,6 +4154,9 @@ declare class VaultMemory extends Model$1 {
|
|
|
4150
4154
|
/** A2 supersession: newer memory id that replaced this one, or null if live. */
|
|
4151
4155
|
supersededBy: string | null;
|
|
4152
4156
|
supersededAt: number | null;
|
|
4157
|
+
/** Extraction-logic version this memory was last stamped under. Null (pre-v38)
|
|
4158
|
+
* reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
|
|
4159
|
+
topicsExtractedVersion: number | null;
|
|
4153
4160
|
createdAt: Date;
|
|
4154
4161
|
updatedAt: Date;
|
|
4155
4162
|
isDeleted: boolean;
|
|
@@ -4264,6 +4271,9 @@ interface StoredVaultMemory {
|
|
|
4264
4271
|
supersededBy: string | null;
|
|
4265
4272
|
/** Unix ms when this memory was superseded. Null when live. */
|
|
4266
4273
|
supersededAt: number | null;
|
|
4274
|
+
/** Extraction-logic version this memory was last stamped under. Null (pre-v38)
|
|
4275
|
+
* reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
|
|
4276
|
+
topicsExtractedVersion: number | null;
|
|
4267
4277
|
createdAt: Date;
|
|
4268
4278
|
updatedAt: Date;
|
|
4269
4279
|
isDeleted: boolean;
|
|
@@ -4400,6 +4410,14 @@ declare function supersedeVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: s
|
|
|
4400
4410
|
* Get all non-deleted, unfiled vault memories (folder_id is null).
|
|
4401
4411
|
*/
|
|
4402
4412
|
declare function getUnfiledVaultMemoriesOp(ctx: VaultMemoryOperationsContext): Promise<StoredVaultMemory[]>;
|
|
4413
|
+
/**
|
|
4414
|
+
* The current topic-extraction logic version. Bump this whenever the extraction
|
|
4415
|
+
* prompt or model in `topicExtract.ts` changes: every memory stamped under an
|
|
4416
|
+
* older version (including pre-v37 rows, read as version 0) is then re-extracted
|
|
4417
|
+
* by the next sweep, so topic-quality improvements propagate across the existing
|
|
4418
|
+
* vault. The worker's `limit` drains that re-extraction across sweeps.
|
|
4419
|
+
*/
|
|
4420
|
+
declare const TOPICS_EXTRACTION_VERSION = 1;
|
|
4403
4421
|
/**
|
|
4404
4422
|
* Result of {@link getMemoriesNeedingTopicExtractionOp}: which memories the
|
|
4405
4423
|
* background topic worker should run LLM entity extraction on, and which it
|
|
@@ -4409,8 +4427,10 @@ interface MemoriesNeedingTopicExtraction {
|
|
|
4409
4427
|
/**
|
|
4410
4428
|
* Memories to run LLM topic extraction on (decrypted): never-extracted rows
|
|
4411
4429
|
* with no entity links, plus stamped rows edited since their last pass
|
|
4412
|
-
* (`updated_at` > `topics_extracted_at`)
|
|
4413
|
-
*
|
|
4430
|
+
* (`updated_at` > `topics_extracted_at`) or extracted under an older
|
|
4431
|
+
* `topics_extracted_version` than {@link TOPICS_EXTRACTION_VERSION}. Edited /
|
|
4432
|
+
* stale-version rows come first (they get priority under `limit`), each group
|
|
4433
|
+
* newest-created first.
|
|
4414
4434
|
*/
|
|
4415
4435
|
pending: StoredVaultMemory[];
|
|
4416
4436
|
/**
|
|
@@ -4434,13 +4454,16 @@ declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsC
|
|
|
4434
4454
|
limit?: number;
|
|
4435
4455
|
}): Promise<MemoriesNeedingTopicExtraction>;
|
|
4436
4456
|
/**
|
|
4437
|
-
* Stamp `topics_extracted_at` on the given
|
|
4438
|
-
* this after a successful extraction pass
|
|
4439
|
-
* quiet memories aren't re-asked every sweep)
|
|
4440
|
-
* `linkedUnstamped` rows without an LLM call.
|
|
4441
|
-
*
|
|
4442
|
-
*
|
|
4443
|
-
*
|
|
4457
|
+
* Stamp `topics_extracted_at` (and `topics_extracted_version`) on the given
|
|
4458
|
+
* memories — the topic worker calls this after a successful extraction pass
|
|
4459
|
+
* (including zero-entity results, so quiet memories aren't re-asked every sweep)
|
|
4460
|
+
* and to grandfather `linkedUnstamped` rows without an LLM call. `version`
|
|
4461
|
+
* defaults to {@link TOPICS_EXTRACTION_VERSION}: stamping at the current version
|
|
4462
|
+
* (for both fresh extractions and grandfathered legacy rows) means they aren't
|
|
4463
|
+
* re-extracted until a future version bump. Preserves `updated_at` so a stamp
|
|
4464
|
+
* never inflates the recency multiplier — and never masks a concurrent content
|
|
4465
|
+
* edit from the next sweep. Skips deleted, foreign-user, and user-managed rows.
|
|
4466
|
+
* Returns the IDs actually stamped.
|
|
4444
4467
|
*
|
|
4445
4468
|
* ALL eligibility AND `updated_at` are read from the LIVE Model inside the
|
|
4446
4469
|
* serialized writer — never a pre-writer snapshot. Writers are serialized, so
|
|
@@ -4455,7 +4478,7 @@ declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsC
|
|
|
4455
4478
|
* (both `pending` and `linkedUnstamped` are capped), so the per-row Model load
|
|
4456
4479
|
* needed to `prepareUpdate` stays bounded and never spikes the RecordCache.
|
|
4457
4480
|
*/
|
|
4458
|
-
declare function stampTopicsExtractedAtOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], extractedAt: number): Promise<string[]>;
|
|
4481
|
+
declare function stampTopicsExtractedAtOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], extractedAt: number, version?: number): Promise<string[]>;
|
|
4459
4482
|
declare function deleteAllVaultMemoriesForUserOp(ctx: VaultMemoryOperationsContext, userId: string): Promise<number>;
|
|
4460
4483
|
declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
|
|
4461
4484
|
|
|
@@ -7768,4 +7791,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
7768
7791
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
7769
7792
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
7770
7793
|
|
|
7771
|
-
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 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_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, 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 EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, 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 MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, 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 ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, 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, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOOL_CATALOG, TOPIC_EXTRACTION_BATCH_SIZE, 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, 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, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, 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, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
|
7794
|
+
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 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_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, 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 EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, 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 MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, 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 ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, 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, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, 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, 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, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, 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, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, 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
|
@@ -57,8 +57,12 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
|
|
|
57
57
|
* write-time supersession — a changed fact retires the stale one (points at
|
|
58
58
|
* the newer memory) instead of both surviving; superseded rows are excluded
|
|
59
59
|
* from recall/dedup by default
|
|
60
|
+
* - v38: Added topics_extracted_version column to memory_vault — the extraction
|
|
61
|
+
* logic version a memory was last stamped under. Bumping TOPICS_EXTRACTION_VERSION
|
|
62
|
+
* (new prompt/model) makes the worker re-extract every row whose stored version
|
|
63
|
+
* is behind, so topic-quality improvements propagate across the existing vault
|
|
60
64
|
*/
|
|
61
|
-
declare const SDK_SCHEMA_VERSION =
|
|
65
|
+
declare const SDK_SCHEMA_VERSION = 38;
|
|
62
66
|
/**
|
|
63
67
|
* Combined WatermelonDB schema for all SDK storage modules.
|
|
64
68
|
*
|
|
@@ -4150,6 +4154,9 @@ declare class VaultMemory extends Model$1 {
|
|
|
4150
4154
|
/** A2 supersession: newer memory id that replaced this one, or null if live. */
|
|
4151
4155
|
supersededBy: string | null;
|
|
4152
4156
|
supersededAt: number | null;
|
|
4157
|
+
/** Extraction-logic version this memory was last stamped under. Null (pre-v38)
|
|
4158
|
+
* reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
|
|
4159
|
+
topicsExtractedVersion: number | null;
|
|
4153
4160
|
createdAt: Date;
|
|
4154
4161
|
updatedAt: Date;
|
|
4155
4162
|
isDeleted: boolean;
|
|
@@ -4264,6 +4271,9 @@ interface StoredVaultMemory {
|
|
|
4264
4271
|
supersededBy: string | null;
|
|
4265
4272
|
/** Unix ms when this memory was superseded. Null when live. */
|
|
4266
4273
|
supersededAt: number | null;
|
|
4274
|
+
/** Extraction-logic version this memory was last stamped under. Null (pre-v38)
|
|
4275
|
+
* reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
|
|
4276
|
+
topicsExtractedVersion: number | null;
|
|
4267
4277
|
createdAt: Date;
|
|
4268
4278
|
updatedAt: Date;
|
|
4269
4279
|
isDeleted: boolean;
|
|
@@ -4400,6 +4410,14 @@ declare function supersedeVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: s
|
|
|
4400
4410
|
* Get all non-deleted, unfiled vault memories (folder_id is null).
|
|
4401
4411
|
*/
|
|
4402
4412
|
declare function getUnfiledVaultMemoriesOp(ctx: VaultMemoryOperationsContext): Promise<StoredVaultMemory[]>;
|
|
4413
|
+
/**
|
|
4414
|
+
* The current topic-extraction logic version. Bump this whenever the extraction
|
|
4415
|
+
* prompt or model in `topicExtract.ts` changes: every memory stamped under an
|
|
4416
|
+
* older version (including pre-v37 rows, read as version 0) is then re-extracted
|
|
4417
|
+
* by the next sweep, so topic-quality improvements propagate across the existing
|
|
4418
|
+
* vault. The worker's `limit` drains that re-extraction across sweeps.
|
|
4419
|
+
*/
|
|
4420
|
+
declare const TOPICS_EXTRACTION_VERSION = 1;
|
|
4403
4421
|
/**
|
|
4404
4422
|
* Result of {@link getMemoriesNeedingTopicExtractionOp}: which memories the
|
|
4405
4423
|
* background topic worker should run LLM entity extraction on, and which it
|
|
@@ -4409,8 +4427,10 @@ interface MemoriesNeedingTopicExtraction {
|
|
|
4409
4427
|
/**
|
|
4410
4428
|
* Memories to run LLM topic extraction on (decrypted): never-extracted rows
|
|
4411
4429
|
* with no entity links, plus stamped rows edited since their last pass
|
|
4412
|
-
* (`updated_at` > `topics_extracted_at`)
|
|
4413
|
-
*
|
|
4430
|
+
* (`updated_at` > `topics_extracted_at`) or extracted under an older
|
|
4431
|
+
* `topics_extracted_version` than {@link TOPICS_EXTRACTION_VERSION}. Edited /
|
|
4432
|
+
* stale-version rows come first (they get priority under `limit`), each group
|
|
4433
|
+
* newest-created first.
|
|
4414
4434
|
*/
|
|
4415
4435
|
pending: StoredVaultMemory[];
|
|
4416
4436
|
/**
|
|
@@ -4434,13 +4454,16 @@ declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsC
|
|
|
4434
4454
|
limit?: number;
|
|
4435
4455
|
}): Promise<MemoriesNeedingTopicExtraction>;
|
|
4436
4456
|
/**
|
|
4437
|
-
* Stamp `topics_extracted_at` on the given
|
|
4438
|
-
* this after a successful extraction pass
|
|
4439
|
-
* quiet memories aren't re-asked every sweep)
|
|
4440
|
-
* `linkedUnstamped` rows without an LLM call.
|
|
4441
|
-
*
|
|
4442
|
-
*
|
|
4443
|
-
*
|
|
4457
|
+
* Stamp `topics_extracted_at` (and `topics_extracted_version`) on the given
|
|
4458
|
+
* memories — the topic worker calls this after a successful extraction pass
|
|
4459
|
+
* (including zero-entity results, so quiet memories aren't re-asked every sweep)
|
|
4460
|
+
* and to grandfather `linkedUnstamped` rows without an LLM call. `version`
|
|
4461
|
+
* defaults to {@link TOPICS_EXTRACTION_VERSION}: stamping at the current version
|
|
4462
|
+
* (for both fresh extractions and grandfathered legacy rows) means they aren't
|
|
4463
|
+
* re-extracted until a future version bump. Preserves `updated_at` so a stamp
|
|
4464
|
+
* never inflates the recency multiplier — and never masks a concurrent content
|
|
4465
|
+
* edit from the next sweep. Skips deleted, foreign-user, and user-managed rows.
|
|
4466
|
+
* Returns the IDs actually stamped.
|
|
4444
4467
|
*
|
|
4445
4468
|
* ALL eligibility AND `updated_at` are read from the LIVE Model inside the
|
|
4446
4469
|
* serialized writer — never a pre-writer snapshot. Writers are serialized, so
|
|
@@ -4455,7 +4478,7 @@ declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsC
|
|
|
4455
4478
|
* (both `pending` and `linkedUnstamped` are capped), so the per-row Model load
|
|
4456
4479
|
* needed to `prepareUpdate` stays bounded and never spikes the RecordCache.
|
|
4457
4480
|
*/
|
|
4458
|
-
declare function stampTopicsExtractedAtOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], extractedAt: number): Promise<string[]>;
|
|
4481
|
+
declare function stampTopicsExtractedAtOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], extractedAt: number, version?: number): Promise<string[]>;
|
|
4459
4482
|
declare function deleteAllVaultMemoriesForUserOp(ctx: VaultMemoryOperationsContext, userId: string): Promise<number>;
|
|
4460
4483
|
declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
|
|
4461
4484
|
|
|
@@ -7768,4 +7791,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
7768
7791
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
7769
7792
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
7770
7793
|
|
|
7771
|
-
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 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_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, 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 EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, 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 MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, 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 ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, 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, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOOL_CATALOG, TOPIC_EXTRACTION_BATCH_SIZE, 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, 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, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, 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, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
|
7794
|
+
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 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_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, 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 EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, 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 MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, 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 ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, 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, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, 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, 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, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, 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, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, 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
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ENTITY_KINDS,
|
|
8
8
|
LRUCache,
|
|
9
9
|
RerankerUnavailableError,
|
|
10
|
+
TOPICS_EXTRACTION_VERSION,
|
|
10
11
|
chunkAndEmbedAllMessages,
|
|
11
12
|
chunkAndEmbedMessage,
|
|
12
13
|
chunkText,
|
|
@@ -104,7 +105,7 @@ import {
|
|
|
104
105
|
updateVaultMemoryOp,
|
|
105
106
|
upsertMessageOp,
|
|
106
107
|
vaultMemoryToStored
|
|
107
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-Z6II54I7.mjs";
|
|
108
109
|
import {
|
|
109
110
|
createStreamingDeAnonymizer,
|
|
110
111
|
resolvePiiRedactor
|
|
@@ -1104,6 +1105,9 @@ __decorateClass([
|
|
|
1104
1105
|
__decorateClass([
|
|
1105
1106
|
(0, import_decorators6.field)("superseded_at")
|
|
1106
1107
|
], VaultMemory.prototype, "supersededAt", 2);
|
|
1108
|
+
__decorateClass([
|
|
1109
|
+
(0, import_decorators6.field)("topics_extracted_version")
|
|
1110
|
+
], VaultMemory.prototype, "topicsExtractedVersion", 2);
|
|
1107
1111
|
__decorateClass([
|
|
1108
1112
|
import_decorators6.readonly,
|
|
1109
1113
|
(0, import_decorators6.date)("created_at")
|
|
@@ -1251,7 +1255,7 @@ __decorateClass([
|
|
|
1251
1255
|
], VaultFolder.prototype, "context", 2);
|
|
1252
1256
|
|
|
1253
1257
|
// src/lib/db/schema.ts
|
|
1254
|
-
var SDK_SCHEMA_VERSION =
|
|
1258
|
+
var SDK_SCHEMA_VERSION = 38;
|
|
1255
1259
|
var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
1256
1260
|
version: SDK_SCHEMA_VERSION,
|
|
1257
1261
|
tables: [
|
|
@@ -1385,7 +1389,11 @@ var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
|
1385
1389
|
// and dedup by default. Null = live (not superseded). Indexed so the
|
|
1386
1390
|
// recall filter stays cheap.
|
|
1387
1391
|
{ name: "superseded_by", type: "string", isOptional: true, isIndexed: true },
|
|
1388
|
-
{ name: "superseded_at", type: "number", isOptional: true }
|
|
1392
|
+
{ name: "superseded_at", type: "number", isOptional: true },
|
|
1393
|
+
// The extraction-logic version this memory was last stamped under. Null
|
|
1394
|
+
// (pre-v38) is treated as version 0, so a bump of TOPICS_EXTRACTION_VERSION
|
|
1395
|
+
// re-extracts stale rows. See getMemoriesNeedingTopicExtractionOp.
|
|
1396
|
+
{ name: "topics_extracted_version", type: "number", isOptional: true }
|
|
1389
1397
|
]
|
|
1390
1398
|
}),
|
|
1391
1399
|
// Entity table — canonical names extracted from auto-extraction (W5).
|
|
@@ -2011,6 +2019,19 @@ var sdkMigrations = (0, import_migrations.schemaMigrations)({
|
|
|
2011
2019
|
]
|
|
2012
2020
|
})
|
|
2013
2021
|
]
|
|
2022
|
+
},
|
|
2023
|
+
// v37 -> v38: topics_extracted_version on memory_vault. Existing rows keep it
|
|
2024
|
+
// NULL, read as version 0 by getMemoriesNeedingTopicExtractionOp — so the
|
|
2025
|
+
// first sweep after a TOPICS_EXTRACTION_VERSION bump re-extracts them (drained
|
|
2026
|
+
// across sweeps by the worker's limit). See topicExtract.ts.
|
|
2027
|
+
{
|
|
2028
|
+
toVersion: 38,
|
|
2029
|
+
steps: [
|
|
2030
|
+
(0, import_migrations.addColumns)({
|
|
2031
|
+
table: "memory_vault",
|
|
2032
|
+
columns: [{ name: "topics_extracted_version", type: "number", isOptional: true }]
|
|
2033
|
+
})
|
|
2034
|
+
]
|
|
2014
2035
|
}
|
|
2015
2036
|
]
|
|
2016
2037
|
});
|
|
@@ -11433,6 +11454,7 @@ export {
|
|
|
11433
11454
|
STREAM_RESUMABLE_HEADER,
|
|
11434
11455
|
StreamExpiredError,
|
|
11435
11456
|
TOOL_CATALOG,
|
|
11457
|
+
TOPICS_EXTRACTION_VERSION,
|
|
11436
11458
|
TOPIC_EXTRACTION_BATCH_SIZE,
|
|
11437
11459
|
TextProcessor,
|
|
11438
11460
|
UserPreference,
|