@lmzhen/dsh-memory 0.31.1 → 0.32.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/lib/index.js +1 -0
- package/lib/types/index.d.ts +9 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var MemoryRegistry = class extends Service {
|
|
|
32
32
|
if (existing !== void 0) return existing;
|
|
33
33
|
}
|
|
34
34
|
this.providers.set(provider.name, provider);
|
|
35
|
+
this.ctx.emit("evolution/memory-provider-registered", { name: provider.name });
|
|
35
36
|
if (this.providerName && provider.name !== this.providerName && !this.providers.has(this.providerName) && !this.pinWarned) {
|
|
36
37
|
this.pinWarned = true;
|
|
37
38
|
this.ctx.logger.warn(`memory: config.provider="${this.providerName}" is not registered (mounted: "${provider.name}"); memory reads and writes fail until that provider mounts`);
|
package/lib/types/index.d.ts
CHANGED
|
@@ -46,6 +46,15 @@ declare module '@deepseek-ai/cordis' {
|
|
|
46
46
|
* @mode emit
|
|
47
47
|
*/
|
|
48
48
|
'evolution/memory-applied'(event: EvolutionMemoryAppliedEvent): void;
|
|
49
|
+
/**
|
|
50
|
+
* A provider registered on the registry. An ANNOUNCEMENT for late consumers that mounted
|
|
51
|
+
* before the provider row; it decides nothing.
|
|
52
|
+
* @param event - the registered provider's name.
|
|
53
|
+
* @mode emit
|
|
54
|
+
*/
|
|
55
|
+
'evolution/memory-provider-registered'(event: {
|
|
56
|
+
readonly name: string;
|
|
57
|
+
}): void;
|
|
49
58
|
}
|
|
50
59
|
}
|
|
51
60
|
export interface MemorySnapshot {
|