@memvid/sdk 2.0.148 → 2.0.151
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/analytics.js +4 -6
- package/dist/index.js +3 -1
- package/dist/types.d.ts +3 -0
- package/package.json +6 -5
package/dist/analytics.js
CHANGED
|
@@ -134,6 +134,8 @@ function trackEvent(event) {
|
|
|
134
134
|
// Silently ignore errors
|
|
135
135
|
});
|
|
136
136
|
}, FLUSH_INTERVAL_MS);
|
|
137
|
+
// Don't prevent process exit while waiting for flush
|
|
138
|
+
flushTimer.unref();
|
|
137
139
|
}
|
|
138
140
|
// Force flush if queue is getting large
|
|
139
141
|
if (eventQueue.length >= MAX_BATCH_SIZE) {
|
|
@@ -209,9 +211,5 @@ async function flush() {
|
|
|
209
211
|
}
|
|
210
212
|
await flushEvents();
|
|
211
213
|
}
|
|
212
|
-
//
|
|
213
|
-
|
|
214
|
-
process.on("beforeExit", () => {
|
|
215
|
-
flush().catch(() => { });
|
|
216
|
-
});
|
|
217
|
-
}
|
|
214
|
+
// Note: No beforeExit handler needed - timer.unref() allows process to exit
|
|
215
|
+
// Events may be lost on quick CLI exits, but that's acceptable for UX
|
package/dist/index.js
CHANGED
|
@@ -900,6 +900,7 @@ function normaliseAskOptions(opts) {
|
|
|
900
900
|
minRelevancy: opts.minRelevancy,
|
|
901
901
|
maxK: opts.maxK,
|
|
902
902
|
adaptiveStrategy: opts.adaptiveStrategy,
|
|
903
|
+
showChunks: opts.showChunks,
|
|
903
904
|
};
|
|
904
905
|
if (payload.k == null &&
|
|
905
906
|
payload.mode == null &&
|
|
@@ -917,7 +918,8 @@ function normaliseAskOptions(opts) {
|
|
|
917
918
|
payload.adaptive == null &&
|
|
918
919
|
payload.minRelevancy == null &&
|
|
919
920
|
payload.maxK == null &&
|
|
920
|
-
payload.adaptiveStrategy == null
|
|
921
|
+
payload.adaptiveStrategy == null &&
|
|
922
|
+
payload.showChunks == null) {
|
|
921
923
|
return undefined;
|
|
922
924
|
}
|
|
923
925
|
return payload;
|
package/dist/types.d.ts
CHANGED
|
@@ -103,6 +103,8 @@ export interface AskInput {
|
|
|
103
103
|
minRelevancy?: number;
|
|
104
104
|
maxK?: number;
|
|
105
105
|
adaptiveStrategy?: "relative" | "absolute" | "cliff" | "elbow" | "combined";
|
|
106
|
+
/** Include full chunk content in response (default: false) */
|
|
107
|
+
showChunks?: boolean;
|
|
106
108
|
}
|
|
107
109
|
export interface TimelineInput {
|
|
108
110
|
limit?: number;
|
|
@@ -245,6 +247,7 @@ export interface NativeAskOptions {
|
|
|
245
247
|
minRelevancy?: number;
|
|
246
248
|
maxK?: number;
|
|
247
249
|
adaptiveStrategy?: string;
|
|
250
|
+
showChunks?: boolean;
|
|
248
251
|
}
|
|
249
252
|
export interface NativeTimelineOptions {
|
|
250
253
|
limit?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memvid/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.151",
|
|
4
4
|
"description": "Single-file AI memory system for Node.js. Store, search, and query documents with built-in RAG.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,10 +41,11 @@
|
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"@memvid/sdk-darwin-arm64": "2.0.
|
|
45
|
-
"@memvid/sdk-darwin-x64": "2.0.
|
|
46
|
-
"@memvid/sdk-linux-x64-gnu": "2.0.
|
|
47
|
-
"@memvid/sdk-
|
|
44
|
+
"@memvid/sdk-darwin-arm64": "2.0.151",
|
|
45
|
+
"@memvid/sdk-darwin-x64": "2.0.151",
|
|
46
|
+
"@memvid/sdk-linux-x64-gnu": "2.0.151",
|
|
47
|
+
"@memvid/sdk-linux-arm64-gnu": "2.0.151",
|
|
48
|
+
"@memvid/sdk-win32-x64-msvc": "2.0.151"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"@langchain/core": ">=0.3.0",
|