dsh-layered-memory 0.9.2 → 0.11.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/README.en.md +36 -13
- package/README.md +33 -10
- package/assets/changelog/0.9.0/01-/350/256/260/345/277/206/350/212/257/347/211/207/347/272/247/350/201/224/350/217/234/345/215/225.png +0 -0
- package/assets/changelog/0.9.0/02-/345/267/245/344/275/234/345/217/260/346/200/273/350/247/210.png +0 -0
- package/assets/changelog/0.9.0/03-/350/256/260/345/277/206/345/272/223.png +0 -0
- package/assets/changelog/0.9.0/04-/346/264/236/345/257/237/346/264/273/345/212/250.png +0 -0
- package/dist/config.d.ts +1 -491
- package/dist/config.js +3 -0
- package/dist/hooks/recall.js +6 -1
- package/dist/index.d.ts +1 -491
- package/dist/index.js +4 -0
- package/dist/settings.d.ts +2 -0
- package/dist/settings.js +17 -0
- package/dist/tui.d.ts +22 -0
- package/dist/tui.js +201 -0
- package/package.json +14 -12
package/dist/config.d.ts
CHANGED
|
@@ -142,495 +142,5 @@ export interface MemoryConfig {
|
|
|
142
142
|
* 仅供基准/调试部署(bench profile 的 lifecycle 赛道),默认关——生产零表面积。 */
|
|
143
143
|
benchControl: boolean;
|
|
144
144
|
}
|
|
145
|
-
export declare const memorySchema: Schema<
|
|
146
|
-
dataDir: Schema<string, string>;
|
|
147
|
-
family: Schema<"chat" | "work" | "auto", "chat" | "work" | "auto">;
|
|
148
|
-
capture: Schema<Schemastery.ObjectS<{
|
|
149
|
-
enabled: Schema<boolean, boolean>;
|
|
150
|
-
stripCodeBlocks: Schema<boolean, boolean>;
|
|
151
|
-
maxMessageChars: Schema<number, number>;
|
|
152
|
-
}>, Schemastery.ObjectT<{
|
|
153
|
-
enabled: Schema<boolean, boolean>;
|
|
154
|
-
stripCodeBlocks: Schema<boolean, boolean>;
|
|
155
|
-
maxMessageChars: Schema<number, number>;
|
|
156
|
-
}>>;
|
|
157
|
-
extract: Schema<Schemastery.ObjectS<{
|
|
158
|
-
enabled: Schema<boolean, boolean>;
|
|
159
|
-
minMessages: Schema<number, number>;
|
|
160
|
-
idleSeconds: Schema<number, number>;
|
|
161
|
-
backgroundMessages: Schema<number, number>;
|
|
162
|
-
candidatePool: Schema<number, number>;
|
|
163
|
-
}>, Schemastery.ObjectT<{
|
|
164
|
-
enabled: Schema<boolean, boolean>;
|
|
165
|
-
minMessages: Schema<number, number>;
|
|
166
|
-
idleSeconds: Schema<number, number>;
|
|
167
|
-
backgroundMessages: Schema<number, number>;
|
|
168
|
-
candidatePool: Schema<number, number>;
|
|
169
|
-
}>>;
|
|
170
|
-
l2: Schema<Schemastery.ObjectS<{
|
|
171
|
-
enabled: Schema<boolean, boolean>;
|
|
172
|
-
minNewMemories: Schema<number, number>;
|
|
173
|
-
maxScenes: Schema<number, number>;
|
|
174
|
-
sceneContextLimit: Schema<number, number>;
|
|
175
|
-
}>, Schemastery.ObjectT<{
|
|
176
|
-
enabled: Schema<boolean, boolean>;
|
|
177
|
-
minNewMemories: Schema<number, number>;
|
|
178
|
-
maxScenes: Schema<number, number>;
|
|
179
|
-
sceneContextLimit: Schema<number, number>;
|
|
180
|
-
}>>;
|
|
181
|
-
l3: Schema<Schemastery.ObjectS<{
|
|
182
|
-
enabled: Schema<boolean, boolean>;
|
|
183
|
-
interval: Schema<number, number>;
|
|
184
|
-
}>, Schemastery.ObjectT<{
|
|
185
|
-
enabled: Schema<boolean, boolean>;
|
|
186
|
-
interval: Schema<number, number>;
|
|
187
|
-
}>>;
|
|
188
|
-
recall: Schema<Schemastery.ObjectS<{
|
|
189
|
-
enabled: Schema<boolean, boolean>;
|
|
190
|
-
maxResults: Schema<number, number>;
|
|
191
|
-
maxCharsPerMemory: Schema<number, number>;
|
|
192
|
-
maxTotalRecallChars: Schema<number, number>;
|
|
193
|
-
timeoutMs: Schema<number, number>;
|
|
194
|
-
includePersona: Schema<boolean, boolean>;
|
|
195
|
-
includeSceneNav: Schema<boolean, boolean>;
|
|
196
|
-
strategy: Schema<"hybrid" | "keyword" | "embedding", "hybrid" | "keyword" | "embedding">;
|
|
197
|
-
scoreThreshold: Schema<number, number>;
|
|
198
|
-
decayHalfLifeDays: Schema<number, number>;
|
|
199
|
-
}>, Schemastery.ObjectT<{
|
|
200
|
-
enabled: Schema<boolean, boolean>;
|
|
201
|
-
maxResults: Schema<number, number>;
|
|
202
|
-
maxCharsPerMemory: Schema<number, number>;
|
|
203
|
-
maxTotalRecallChars: Schema<number, number>;
|
|
204
|
-
timeoutMs: Schema<number, number>;
|
|
205
|
-
includePersona: Schema<boolean, boolean>;
|
|
206
|
-
includeSceneNav: Schema<boolean, boolean>;
|
|
207
|
-
strategy: Schema<"hybrid" | "keyword" | "embedding", "hybrid" | "keyword" | "embedding">;
|
|
208
|
-
scoreThreshold: Schema<number, number>;
|
|
209
|
-
decayHalfLifeDays: Schema<number, number>;
|
|
210
|
-
}>>;
|
|
211
|
-
embedding: Schema<Schemastery.ObjectS<{
|
|
212
|
-
enabled: Schema<boolean, boolean>;
|
|
213
|
-
baseUrl: Schema<string, string>;
|
|
214
|
-
apiKey: Schema<string, string>;
|
|
215
|
-
model: Schema<string, string>;
|
|
216
|
-
dimensions: Schema<number, number>;
|
|
217
|
-
maxInputChars: Schema<number, number>;
|
|
218
|
-
timeoutMs: Schema<number, number>;
|
|
219
|
-
allowLocalModels: Schema<boolean, boolean>;
|
|
220
|
-
mirror: Schema<string, string>;
|
|
221
|
-
proxy: Schema<string, string>;
|
|
222
|
-
}>, Schemastery.ObjectT<{
|
|
223
|
-
enabled: Schema<boolean, boolean>;
|
|
224
|
-
baseUrl: Schema<string, string>;
|
|
225
|
-
apiKey: Schema<string, string>;
|
|
226
|
-
model: Schema<string, string>;
|
|
227
|
-
dimensions: Schema<number, number>;
|
|
228
|
-
maxInputChars: Schema<number, number>;
|
|
229
|
-
timeoutMs: Schema<number, number>;
|
|
230
|
-
allowLocalModels: Schema<boolean, boolean>;
|
|
231
|
-
mirror: Schema<string, string>;
|
|
232
|
-
proxy: Schema<string, string>;
|
|
233
|
-
}>>;
|
|
234
|
-
llm: Schema<Schemastery.ObjectS<{
|
|
235
|
-
provider: Schema<string, string>;
|
|
236
|
-
model: Schema<string, string>;
|
|
237
|
-
fallbacks: Schema<({
|
|
238
|
-
provider?: string | null | undefined;
|
|
239
|
-
model?: string | null | undefined;
|
|
240
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
241
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
242
|
-
provider: Schema<string, string>;
|
|
243
|
-
model: Schema<string, string>;
|
|
244
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
245
|
-
}>[]>;
|
|
246
|
-
layerRoutes: Schema<Schemastery.ObjectS<{
|
|
247
|
-
l1: Schema<({
|
|
248
|
-
provider?: string | null | undefined;
|
|
249
|
-
model?: string | null | undefined;
|
|
250
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
251
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
252
|
-
provider: Schema<string, string>;
|
|
253
|
-
model: Schema<string, string>;
|
|
254
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
255
|
-
}>[]>;
|
|
256
|
-
l2: Schema<({
|
|
257
|
-
provider?: string | null | undefined;
|
|
258
|
-
model?: string | null | undefined;
|
|
259
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
260
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
261
|
-
provider: Schema<string, string>;
|
|
262
|
-
model: Schema<string, string>;
|
|
263
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
264
|
-
}>[]>;
|
|
265
|
-
l3: Schema<({
|
|
266
|
-
provider?: string | null | undefined;
|
|
267
|
-
model?: string | null | undefined;
|
|
268
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
269
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
270
|
-
provider: Schema<string, string>;
|
|
271
|
-
model: Schema<string, string>;
|
|
272
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
273
|
-
}>[]>;
|
|
274
|
-
}>, Schemastery.ObjectT<{
|
|
275
|
-
l1: Schema<({
|
|
276
|
-
provider?: string | null | undefined;
|
|
277
|
-
model?: string | null | undefined;
|
|
278
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
279
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
280
|
-
provider: Schema<string, string>;
|
|
281
|
-
model: Schema<string, string>;
|
|
282
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
283
|
-
}>[]>;
|
|
284
|
-
l2: Schema<({
|
|
285
|
-
provider?: string | null | undefined;
|
|
286
|
-
model?: string | null | undefined;
|
|
287
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
288
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
289
|
-
provider: Schema<string, string>;
|
|
290
|
-
model: Schema<string, string>;
|
|
291
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
292
|
-
}>[]>;
|
|
293
|
-
l3: Schema<({
|
|
294
|
-
provider?: string | null | undefined;
|
|
295
|
-
model?: string | null | undefined;
|
|
296
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
297
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
298
|
-
provider: Schema<string, string>;
|
|
299
|
-
model: Schema<string, string>;
|
|
300
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
301
|
-
}>[]>;
|
|
302
|
-
}>>;
|
|
303
|
-
maxTokens: Schema<number, number>;
|
|
304
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
305
|
-
temperature: Schema<number, number>;
|
|
306
|
-
maxInputChars: Schema<number, number>;
|
|
307
|
-
timeoutMs: Schema<number, number>;
|
|
308
|
-
}>, Schemastery.ObjectT<{
|
|
309
|
-
provider: Schema<string, string>;
|
|
310
|
-
model: Schema<string, string>;
|
|
311
|
-
fallbacks: Schema<({
|
|
312
|
-
provider?: string | null | undefined;
|
|
313
|
-
model?: string | null | undefined;
|
|
314
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
315
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
316
|
-
provider: Schema<string, string>;
|
|
317
|
-
model: Schema<string, string>;
|
|
318
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
319
|
-
}>[]>;
|
|
320
|
-
layerRoutes: Schema<Schemastery.ObjectS<{
|
|
321
|
-
l1: Schema<({
|
|
322
|
-
provider?: string | null | undefined;
|
|
323
|
-
model?: string | null | undefined;
|
|
324
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
325
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
326
|
-
provider: Schema<string, string>;
|
|
327
|
-
model: Schema<string, string>;
|
|
328
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
329
|
-
}>[]>;
|
|
330
|
-
l2: Schema<({
|
|
331
|
-
provider?: string | null | undefined;
|
|
332
|
-
model?: string | null | undefined;
|
|
333
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
334
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
335
|
-
provider: Schema<string, string>;
|
|
336
|
-
model: Schema<string, string>;
|
|
337
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
338
|
-
}>[]>;
|
|
339
|
-
l3: Schema<({
|
|
340
|
-
provider?: string | null | undefined;
|
|
341
|
-
model?: string | null | undefined;
|
|
342
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
343
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
344
|
-
provider: Schema<string, string>;
|
|
345
|
-
model: Schema<string, string>;
|
|
346
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
347
|
-
}>[]>;
|
|
348
|
-
}>, Schemastery.ObjectT<{
|
|
349
|
-
l1: Schema<({
|
|
350
|
-
provider?: string | null | undefined;
|
|
351
|
-
model?: string | null | undefined;
|
|
352
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
353
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
354
|
-
provider: Schema<string, string>;
|
|
355
|
-
model: Schema<string, string>;
|
|
356
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
357
|
-
}>[]>;
|
|
358
|
-
l2: Schema<({
|
|
359
|
-
provider?: string | null | undefined;
|
|
360
|
-
model?: string | null | undefined;
|
|
361
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
362
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
363
|
-
provider: Schema<string, string>;
|
|
364
|
-
model: Schema<string, string>;
|
|
365
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
366
|
-
}>[]>;
|
|
367
|
-
l3: Schema<({
|
|
368
|
-
provider?: string | null | undefined;
|
|
369
|
-
model?: string | null | undefined;
|
|
370
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
371
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
372
|
-
provider: Schema<string, string>;
|
|
373
|
-
model: Schema<string, string>;
|
|
374
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
375
|
-
}>[]>;
|
|
376
|
-
}>>;
|
|
377
|
-
maxTokens: Schema<number, number>;
|
|
378
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
379
|
-
temperature: Schema<number, number>;
|
|
380
|
-
maxInputChars: Schema<number, number>;
|
|
381
|
-
timeoutMs: Schema<number, number>;
|
|
382
|
-
}>>;
|
|
383
|
-
tokenCost: Schema<Schemastery.ObjectS<{
|
|
384
|
-
retentionDays: Schema<number, number>;
|
|
385
|
-
}>, Schemastery.ObjectT<{
|
|
386
|
-
retentionDays: Schema<number, number>;
|
|
387
|
-
}>>;
|
|
388
|
-
tools: Schema<boolean, boolean>;
|
|
389
|
-
benchControl: Schema<boolean, boolean>;
|
|
390
|
-
}>, Schemastery.ObjectT<{
|
|
391
|
-
dataDir: Schema<string, string>;
|
|
392
|
-
family: Schema<"chat" | "work" | "auto", "chat" | "work" | "auto">;
|
|
393
|
-
capture: Schema<Schemastery.ObjectS<{
|
|
394
|
-
enabled: Schema<boolean, boolean>;
|
|
395
|
-
stripCodeBlocks: Schema<boolean, boolean>;
|
|
396
|
-
maxMessageChars: Schema<number, number>;
|
|
397
|
-
}>, Schemastery.ObjectT<{
|
|
398
|
-
enabled: Schema<boolean, boolean>;
|
|
399
|
-
stripCodeBlocks: Schema<boolean, boolean>;
|
|
400
|
-
maxMessageChars: Schema<number, number>;
|
|
401
|
-
}>>;
|
|
402
|
-
extract: Schema<Schemastery.ObjectS<{
|
|
403
|
-
enabled: Schema<boolean, boolean>;
|
|
404
|
-
minMessages: Schema<number, number>;
|
|
405
|
-
idleSeconds: Schema<number, number>;
|
|
406
|
-
backgroundMessages: Schema<number, number>;
|
|
407
|
-
candidatePool: Schema<number, number>;
|
|
408
|
-
}>, Schemastery.ObjectT<{
|
|
409
|
-
enabled: Schema<boolean, boolean>;
|
|
410
|
-
minMessages: Schema<number, number>;
|
|
411
|
-
idleSeconds: Schema<number, number>;
|
|
412
|
-
backgroundMessages: Schema<number, number>;
|
|
413
|
-
candidatePool: Schema<number, number>;
|
|
414
|
-
}>>;
|
|
415
|
-
l2: Schema<Schemastery.ObjectS<{
|
|
416
|
-
enabled: Schema<boolean, boolean>;
|
|
417
|
-
minNewMemories: Schema<number, number>;
|
|
418
|
-
maxScenes: Schema<number, number>;
|
|
419
|
-
sceneContextLimit: Schema<number, number>;
|
|
420
|
-
}>, Schemastery.ObjectT<{
|
|
421
|
-
enabled: Schema<boolean, boolean>;
|
|
422
|
-
minNewMemories: Schema<number, number>;
|
|
423
|
-
maxScenes: Schema<number, number>;
|
|
424
|
-
sceneContextLimit: Schema<number, number>;
|
|
425
|
-
}>>;
|
|
426
|
-
l3: Schema<Schemastery.ObjectS<{
|
|
427
|
-
enabled: Schema<boolean, boolean>;
|
|
428
|
-
interval: Schema<number, number>;
|
|
429
|
-
}>, Schemastery.ObjectT<{
|
|
430
|
-
enabled: Schema<boolean, boolean>;
|
|
431
|
-
interval: Schema<number, number>;
|
|
432
|
-
}>>;
|
|
433
|
-
recall: Schema<Schemastery.ObjectS<{
|
|
434
|
-
enabled: Schema<boolean, boolean>;
|
|
435
|
-
maxResults: Schema<number, number>;
|
|
436
|
-
maxCharsPerMemory: Schema<number, number>;
|
|
437
|
-
maxTotalRecallChars: Schema<number, number>;
|
|
438
|
-
timeoutMs: Schema<number, number>;
|
|
439
|
-
includePersona: Schema<boolean, boolean>;
|
|
440
|
-
includeSceneNav: Schema<boolean, boolean>;
|
|
441
|
-
strategy: Schema<"hybrid" | "keyword" | "embedding", "hybrid" | "keyword" | "embedding">;
|
|
442
|
-
scoreThreshold: Schema<number, number>;
|
|
443
|
-
decayHalfLifeDays: Schema<number, number>;
|
|
444
|
-
}>, Schemastery.ObjectT<{
|
|
445
|
-
enabled: Schema<boolean, boolean>;
|
|
446
|
-
maxResults: Schema<number, number>;
|
|
447
|
-
maxCharsPerMemory: Schema<number, number>;
|
|
448
|
-
maxTotalRecallChars: Schema<number, number>;
|
|
449
|
-
timeoutMs: Schema<number, number>;
|
|
450
|
-
includePersona: Schema<boolean, boolean>;
|
|
451
|
-
includeSceneNav: Schema<boolean, boolean>;
|
|
452
|
-
strategy: Schema<"hybrid" | "keyword" | "embedding", "hybrid" | "keyword" | "embedding">;
|
|
453
|
-
scoreThreshold: Schema<number, number>;
|
|
454
|
-
decayHalfLifeDays: Schema<number, number>;
|
|
455
|
-
}>>;
|
|
456
|
-
embedding: Schema<Schemastery.ObjectS<{
|
|
457
|
-
enabled: Schema<boolean, boolean>;
|
|
458
|
-
baseUrl: Schema<string, string>;
|
|
459
|
-
apiKey: Schema<string, string>;
|
|
460
|
-
model: Schema<string, string>;
|
|
461
|
-
dimensions: Schema<number, number>;
|
|
462
|
-
maxInputChars: Schema<number, number>;
|
|
463
|
-
timeoutMs: Schema<number, number>;
|
|
464
|
-
allowLocalModels: Schema<boolean, boolean>;
|
|
465
|
-
mirror: Schema<string, string>;
|
|
466
|
-
proxy: Schema<string, string>;
|
|
467
|
-
}>, Schemastery.ObjectT<{
|
|
468
|
-
enabled: Schema<boolean, boolean>;
|
|
469
|
-
baseUrl: Schema<string, string>;
|
|
470
|
-
apiKey: Schema<string, string>;
|
|
471
|
-
model: Schema<string, string>;
|
|
472
|
-
dimensions: Schema<number, number>;
|
|
473
|
-
maxInputChars: Schema<number, number>;
|
|
474
|
-
timeoutMs: Schema<number, number>;
|
|
475
|
-
allowLocalModels: Schema<boolean, boolean>;
|
|
476
|
-
mirror: Schema<string, string>;
|
|
477
|
-
proxy: Schema<string, string>;
|
|
478
|
-
}>>;
|
|
479
|
-
llm: Schema<Schemastery.ObjectS<{
|
|
480
|
-
provider: Schema<string, string>;
|
|
481
|
-
model: Schema<string, string>;
|
|
482
|
-
fallbacks: Schema<({
|
|
483
|
-
provider?: string | null | undefined;
|
|
484
|
-
model?: string | null | undefined;
|
|
485
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
486
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
487
|
-
provider: Schema<string, string>;
|
|
488
|
-
model: Schema<string, string>;
|
|
489
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
490
|
-
}>[]>;
|
|
491
|
-
layerRoutes: Schema<Schemastery.ObjectS<{
|
|
492
|
-
l1: Schema<({
|
|
493
|
-
provider?: string | null | undefined;
|
|
494
|
-
model?: string | null | undefined;
|
|
495
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
496
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
497
|
-
provider: Schema<string, string>;
|
|
498
|
-
model: Schema<string, string>;
|
|
499
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
500
|
-
}>[]>;
|
|
501
|
-
l2: Schema<({
|
|
502
|
-
provider?: string | null | undefined;
|
|
503
|
-
model?: string | null | undefined;
|
|
504
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
505
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
506
|
-
provider: Schema<string, string>;
|
|
507
|
-
model: Schema<string, string>;
|
|
508
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
509
|
-
}>[]>;
|
|
510
|
-
l3: Schema<({
|
|
511
|
-
provider?: string | null | undefined;
|
|
512
|
-
model?: string | null | undefined;
|
|
513
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
514
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
515
|
-
provider: Schema<string, string>;
|
|
516
|
-
model: Schema<string, string>;
|
|
517
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
518
|
-
}>[]>;
|
|
519
|
-
}>, Schemastery.ObjectT<{
|
|
520
|
-
l1: Schema<({
|
|
521
|
-
provider?: string | null | undefined;
|
|
522
|
-
model?: string | null | undefined;
|
|
523
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
524
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
525
|
-
provider: Schema<string, string>;
|
|
526
|
-
model: Schema<string, string>;
|
|
527
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
528
|
-
}>[]>;
|
|
529
|
-
l2: Schema<({
|
|
530
|
-
provider?: string | null | undefined;
|
|
531
|
-
model?: string | null | undefined;
|
|
532
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
533
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
534
|
-
provider: Schema<string, string>;
|
|
535
|
-
model: Schema<string, string>;
|
|
536
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
537
|
-
}>[]>;
|
|
538
|
-
l3: Schema<({
|
|
539
|
-
provider?: string | null | undefined;
|
|
540
|
-
model?: string | null | undefined;
|
|
541
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
542
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
543
|
-
provider: Schema<string, string>;
|
|
544
|
-
model: Schema<string, string>;
|
|
545
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
546
|
-
}>[]>;
|
|
547
|
-
}>>;
|
|
548
|
-
maxTokens: Schema<number, number>;
|
|
549
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
550
|
-
temperature: Schema<number, number>;
|
|
551
|
-
maxInputChars: Schema<number, number>;
|
|
552
|
-
timeoutMs: Schema<number, number>;
|
|
553
|
-
}>, Schemastery.ObjectT<{
|
|
554
|
-
provider: Schema<string, string>;
|
|
555
|
-
model: Schema<string, string>;
|
|
556
|
-
fallbacks: Schema<({
|
|
557
|
-
provider?: string | null | undefined;
|
|
558
|
-
model?: string | null | undefined;
|
|
559
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
560
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
561
|
-
provider: Schema<string, string>;
|
|
562
|
-
model: Schema<string, string>;
|
|
563
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
564
|
-
}>[]>;
|
|
565
|
-
layerRoutes: Schema<Schemastery.ObjectS<{
|
|
566
|
-
l1: Schema<({
|
|
567
|
-
provider?: string | null | undefined;
|
|
568
|
-
model?: string | null | undefined;
|
|
569
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
570
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
571
|
-
provider: Schema<string, string>;
|
|
572
|
-
model: Schema<string, string>;
|
|
573
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
574
|
-
}>[]>;
|
|
575
|
-
l2: Schema<({
|
|
576
|
-
provider?: string | null | undefined;
|
|
577
|
-
model?: string | null | undefined;
|
|
578
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
579
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
580
|
-
provider: Schema<string, string>;
|
|
581
|
-
model: Schema<string, string>;
|
|
582
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
583
|
-
}>[]>;
|
|
584
|
-
l3: Schema<({
|
|
585
|
-
provider?: string | null | undefined;
|
|
586
|
-
model?: string | null | undefined;
|
|
587
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
588
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
589
|
-
provider: Schema<string, string>;
|
|
590
|
-
model: Schema<string, string>;
|
|
591
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
592
|
-
}>[]>;
|
|
593
|
-
}>, Schemastery.ObjectT<{
|
|
594
|
-
l1: Schema<({
|
|
595
|
-
provider?: string | null | undefined;
|
|
596
|
-
model?: string | null | undefined;
|
|
597
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
598
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
599
|
-
provider: Schema<string, string>;
|
|
600
|
-
model: Schema<string, string>;
|
|
601
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
602
|
-
}>[]>;
|
|
603
|
-
l2: Schema<({
|
|
604
|
-
provider?: string | null | undefined;
|
|
605
|
-
model?: string | null | undefined;
|
|
606
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
607
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
608
|
-
provider: Schema<string, string>;
|
|
609
|
-
model: Schema<string, string>;
|
|
610
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
611
|
-
}>[]>;
|
|
612
|
-
l3: Schema<({
|
|
613
|
-
provider?: string | null | undefined;
|
|
614
|
-
model?: string | null | undefined;
|
|
615
|
-
reasoningEffort?: "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
|
|
616
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
|
|
617
|
-
provider: Schema<string, string>;
|
|
618
|
-
model: Schema<string, string>;
|
|
619
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
620
|
-
}>[]>;
|
|
621
|
-
}>>;
|
|
622
|
-
maxTokens: Schema<number, number>;
|
|
623
|
-
reasoningEffort: Schema<"" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "" | "off" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
|
|
624
|
-
temperature: Schema<number, number>;
|
|
625
|
-
maxInputChars: Schema<number, number>;
|
|
626
|
-
timeoutMs: Schema<number, number>;
|
|
627
|
-
}>>;
|
|
628
|
-
tokenCost: Schema<Schemastery.ObjectS<{
|
|
629
|
-
retentionDays: Schema<number, number>;
|
|
630
|
-
}>, Schemastery.ObjectT<{
|
|
631
|
-
retentionDays: Schema<number, number>;
|
|
632
|
-
}>>;
|
|
633
|
-
tools: Schema<boolean, boolean>;
|
|
634
|
-
benchControl: Schema<boolean, boolean>;
|
|
635
|
-
}>>;
|
|
145
|
+
export declare const memorySchema: Schema<any, MemoryConfig>;
|
|
636
146
|
export declare function resolveDataDir(cfg: MemoryConfig): string;
|
package/dist/config.js
CHANGED
|
@@ -13,6 +13,9 @@ import { dshHomePath } from '@deepseek-ai/dsh-home-paths';
|
|
|
13
13
|
*/
|
|
14
14
|
// satisfies 反向锁定:词汇表扩词必须同步契约的 EffortChoice 联合(host 与 TS 化的 client 共用)
|
|
15
15
|
export const EFFORT_CHOICES = ['', 'off', 'none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'];
|
|
16
|
+
// 显式注解(官方 dsh-time-context 同款思路):pnpm 符号链接布局下 TS 无法为推断类型
|
|
17
|
+
// 命名传递依赖 cosmokit(TS2742)。输入侧 any(cordis 校验按 schema 填默认,原始
|
|
18
|
+
// 输入本就宽松),输出侧钉死 MemoryConfig(.d.ts 只引用本包公开类型)。
|
|
16
19
|
export const memorySchema = Schema.object({
|
|
17
20
|
dataDir: Schema.string().default(''),
|
|
18
21
|
family: Schema.union(['auto', 'chat', 'work']).default('auto'),
|
package/dist/hooks/recall.js
CHANGED
|
@@ -287,8 +287,13 @@ export function registerRecall(ctx, cfg, stores, logger, live, modes, dataDir) {
|
|
|
287
287
|
const session = typeof sessions?.get === 'function' ? sessions.get(sessionId) : undefined;
|
|
288
288
|
if (session) {
|
|
289
289
|
const visible = new Set(session.surface.nodes);
|
|
290
|
+
// 宿主 0.1.2-rc.1 起移除 events getter,改 snapshotEvents();旧宿主仍走 events。
|
|
291
|
+
// 两者皆缺(未来宿主再改名)按不可估算处理——null = 回填隐藏,不静默显示零份额
|
|
292
|
+
const log = typeof session.snapshotEvents === 'function' ? session.snapshotEvents() : session.events;
|
|
293
|
+
if (!log)
|
|
294
|
+
return null;
|
|
290
295
|
let total = 0;
|
|
291
|
-
for (const ev of
|
|
296
|
+
for (const ev of log) {
|
|
292
297
|
if (ev.type !== 'user/message' || !visible.has(ev.seq))
|
|
293
298
|
continue;
|
|
294
299
|
const msg = ev.data;
|