@memorilabs/memori 0.0.2 → 0.0.4
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/engines/augmentation.d.ts.map +1 -1
- package/dist/engines/augmentation.js +4 -2
- package/dist/engines/augmentation.js.map +1 -1
- package/dist/integrations/base.d.ts +34 -0
- package/dist/integrations/base.d.ts.map +1 -0
- package/dist/integrations/base.js +77 -0
- package/dist/integrations/base.js.map +1 -0
- package/dist/integrations/index.d.ts +3 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +2 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/openclaw.d.ts +42 -0
- package/dist/integrations/openclaw.d.ts.map +1 -0
- package/dist/integrations/openclaw.js +53 -0
- package/dist/integrations/openclaw.js.map +1 -0
- package/dist/memori.d.ts +9 -0
- package/dist/memori.d.ts.map +1 -1
- package/dist/memori.js +16 -0
- package/dist/memori.js.map +1 -1
- package/dist/types/integrations.d.ts +83 -0
- package/dist/types/integrations.d.ts.map +1 -0
- package/dist/types/integrations.js +2 -0
- package/dist/types/integrations.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"augmentation.d.ts","sourceRoot":"","sources":["../../src/engines/augmentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFP,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc;IAGnC,kBAAkB,CACvB,GAAG,EAAE,UAAU,EACf,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,WAAW,GACf,OAAO,CAAC,WAAW,CAAC;IA0BvB,OAAO,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"augmentation.d.ts","sourceRoot":"","sources":["../../src/engines/augmentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFP,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc;IAGnC,kBAAkB,CACvB,GAAG,EAAE,UAAU,EACf,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,WAAW,GACf,OAAO,CAAC,WAAW,CAAC;IA0BvB,OAAO,CAAC,SAAS;CAuBlB"}
|
|
@@ -38,7 +38,7 @@ export class AugmentationEngine {
|
|
|
38
38
|
entity: { id: this.config.entityId },
|
|
39
39
|
process: { id: this.config.processId },
|
|
40
40
|
},
|
|
41
|
-
sdk: { lang: 'javascript', version: SDK_VERSION },
|
|
41
|
+
sdk: { lang: 'javascript', version: ctx.metadata.integrationSdkVersion || SDK_VERSION },
|
|
42
42
|
framework: null,
|
|
43
43
|
llm: {
|
|
44
44
|
model: {
|
|
@@ -49,7 +49,9 @@ export class AugmentationEngine {
|
|
|
49
49
|
version: req.model || null,
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
|
-
platform:
|
|
52
|
+
platform: {
|
|
53
|
+
provider: ctx.metadata.platform || null,
|
|
54
|
+
},
|
|
53
55
|
storage: null,
|
|
54
56
|
};
|
|
55
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"augmentation.js","sourceRoot":"","sources":["../../src/engines/augmentation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,OAAO,kBAAkB;IAEV;IACA;IACA;IAHnB,YACmB,GAAQ,EACR,MAAc,EACd,OAAuB;QAFvB,QAAG,GAAH,GAAG,CAAK;QACR,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAgB;IACvC,CAAC;IAEG,kBAAkB,CACvB,GAAe,EACf,GAAgB,EAChB,GAAgB;QAEhB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,SAAS;YAAE,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAE5C,MAAM,eAAe,GAAG,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe;YAAE,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAElD,MAAM,QAAQ,GAAG;YACf,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE;YAC1C,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE;SAC5C,CAAC;QAEF,MAAM,OAAO,GAAG;YACd,YAAY,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;YACzC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;YAC9B,OAAO,EAAE,E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AE;oBACL,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI;oBACvC,GAAG,EAAE;wBACH,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,UAAU,IAAI,IAAI;qBACzC;oBACD,OAAO,EAAE,GAAG,CAAC,KAAK,IAAI,IAAI;iBAC3B;aACF;YACD,QAAQ,EAAE;gBACR,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI;aACxC;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { MemoriCore, IntegrationRequest } from '../types/integrations.js';
|
|
2
|
+
/**
|
|
3
|
+
* Abstract base class for Memori framework integrations.
|
|
4
|
+
*
|
|
5
|
+
* Provides common functionality for translating framework-specific data formats
|
|
6
|
+
* (like OpenClaw messages) into Axon's internal LLM request/response format.
|
|
7
|
+
*
|
|
8
|
+
* This class is internal to the SDK - framework integrations should extend it
|
|
9
|
+
* and implement their own public-facing methods.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class BaseIntegration {
|
|
14
|
+
protected readonly core: MemoriCore;
|
|
15
|
+
constructor(core: MemoriCore);
|
|
16
|
+
/**
|
|
17
|
+
* Internal helper: Captures a conversation turn by translating it into Axon format
|
|
18
|
+
* and feeding it to both the Persistence and Augmentation engines.
|
|
19
|
+
*
|
|
20
|
+
* @param req - The unified integration message containing user text, agent text, and metadata
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
protected executeAugmentation(req: IntegrationRequest): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Internal helper: Recalls memories by translating the query into Axon format,
|
|
26
|
+
* passing it through the Recall engine, and extracting the injected system prompt.
|
|
27
|
+
*
|
|
28
|
+
* @param userMessage - Raw user query text
|
|
29
|
+
* @returns XML-formatted memory context, or undefined if no session or recall fails
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
protected executeRecall(userMessage: string): Promise<string | undefined>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/integrations/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,8BAAsB,eAAe;IACvB,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU;gBAAhB,IAAI,EAAE,UAAU;IAE/C;;;;;;OAMG;cACa,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB3E;;;;;;;OAOG;cACa,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAsBhF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abstract base class for Memori framework integrations.
|
|
3
|
+
*
|
|
4
|
+
* Provides common functionality for translating framework-specific data formats
|
|
5
|
+
* (like OpenClaw messages) into Axon's internal LLM request/response format.
|
|
6
|
+
*
|
|
7
|
+
* This class is internal to the SDK - framework integrations should extend it
|
|
8
|
+
* and implement their own public-facing methods.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export class BaseIntegration {
|
|
13
|
+
core;
|
|
14
|
+
constructor(core) {
|
|
15
|
+
this.core = core;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Internal helper: Captures a conversation turn by translating it into Axon format
|
|
19
|
+
* and feeding it to both the Persistence and Augmentation engines.
|
|
20
|
+
*
|
|
21
|
+
* @param req - The unified integration message containing user text, agent text, and metadata
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
async executeAugmentation(req) {
|
|
25
|
+
if (!this.core.session.id)
|
|
26
|
+
return;
|
|
27
|
+
const syntheticReq = {
|
|
28
|
+
messages: [{ role: 'user', content: req.userMessage }],
|
|
29
|
+
model: req.metadata?.model || '',
|
|
30
|
+
};
|
|
31
|
+
const syntheticRes = {
|
|
32
|
+
content: req.agentResponse,
|
|
33
|
+
};
|
|
34
|
+
const syntheticCtx = {
|
|
35
|
+
traceId: `integration-trace-${Date.now()}`,
|
|
36
|
+
startedAt: new Date(),
|
|
37
|
+
metadata: req.metadata,
|
|
38
|
+
};
|
|
39
|
+
try {
|
|
40
|
+
await this.core.persistence.handlePersistence(syntheticReq, syntheticRes, syntheticCtx);
|
|
41
|
+
await this.core.augmentation.handleAugmentation(syntheticReq, syntheticRes, syntheticCtx);
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
console.warn('Memori Integration Capture failed:', e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Internal helper: Recalls memories by translating the query into Axon format,
|
|
49
|
+
* passing it through the Recall engine, and extracting the injected system prompt.
|
|
50
|
+
*
|
|
51
|
+
* @param userMessage - Raw user query text
|
|
52
|
+
* @returns XML-formatted memory context, or undefined if no session or recall fails
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
async executeRecall(userMessage) {
|
|
56
|
+
if (!this.core.session.id)
|
|
57
|
+
return undefined;
|
|
58
|
+
const syntheticReq = {
|
|
59
|
+
messages: [{ role: 'user', content: userMessage }],
|
|
60
|
+
};
|
|
61
|
+
const syntheticCtx = {
|
|
62
|
+
traceId: `integration-trace-${Date.now()}`,
|
|
63
|
+
startedAt: new Date(),
|
|
64
|
+
metadata: {},
|
|
65
|
+
};
|
|
66
|
+
try {
|
|
67
|
+
const updatedReq = await this.core.recall.handleRecall(syntheticReq, syntheticCtx);
|
|
68
|
+
const systemMsg = updatedReq.messages.find((m) => m.role === 'system');
|
|
69
|
+
return systemMsg?.content;
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
console.warn('Memori Integration Recall failed:', e);
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/integrations/base.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,eAAe;IACJ;IAA/B,YAA+B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEnD;;;;;;OAMG;IACO,KAAK,CAAC,mBAAmB,CAAC,GAAuB;QACzD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,OAAO;QAElC,MAAM,YAAY,GAAe;YAC/B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC;YACtD,KAAK,EAAE,GAAG,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;SACjC,CAAC;QACF,MAAM,YAAY,GAAgB;YAChC,OAAO,EAAE,GAAG,CAAC,aAAa;SAC3B,CAAC;QAEF,MAAM,YAAY,GAAgB;YAChC,OAAO,EAAE,qBAAqB,IAAI,CAAC,GAAG,EAAE,EAAE;YAC1C,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE,GAAG,CAAC,QAA8C;SAC7D,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;YACxF,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;QAC5F,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED;;;;;;;OAOG;IACO,KAAK,CAAC,aAAa,CAAC,WAAmB;QAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,OAAO,SAAS,CAAC;QAE5C,MAAM,YAAY,GAAe;YAC/B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;SACnD,CAAC;QAEF,MAAM,YAAY,GAAgB;YAChC,OAAO,EAAE,qBAAqB,IAAI,CAAC,GAAG,EAAE,EAAE;YAC1C,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE,EAAE;SACb,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YACnF,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;YACvE,OAAO,SAAS,EAAE,OAAO,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;YACrD,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IntegrationRequest } from 'src/types/integrations.js';
|
|
2
|
+
import { BaseIntegration } from './base.js';
|
|
3
|
+
/**
|
|
4
|
+
* OpenClaw-specific integration for Memori.
|
|
5
|
+
* Provides memory capture and recall functionality for OpenClaw agents.
|
|
6
|
+
*/
|
|
7
|
+
export declare class OpenClawIntegration extends BaseIntegration {
|
|
8
|
+
/**
|
|
9
|
+
* Sets the attribution context for memory operations.
|
|
10
|
+
*
|
|
11
|
+
* @param entityId - Unique identifier for the entity (required)
|
|
12
|
+
* @param processId - Optional identifier for the workflow/process/agent
|
|
13
|
+
* @returns This instance for method chaining
|
|
14
|
+
*/
|
|
15
|
+
setAttribution(entityId: string, processId?: string): this;
|
|
16
|
+
/**
|
|
17
|
+
* Sets the current conversation session ID.
|
|
18
|
+
*
|
|
19
|
+
* @param sessionId - Unique session identifier
|
|
20
|
+
* @returns This instance for method chaining
|
|
21
|
+
*/
|
|
22
|
+
setSession(sessionId: string): this;
|
|
23
|
+
/**
|
|
24
|
+
* Captures a conversation turn and sends it to Memori for processing.
|
|
25
|
+
*
|
|
26
|
+
* @param req - The unified integration message containing user text, agent text, and metadata
|
|
27
|
+
* @returns Promise that resolves when capture is complete
|
|
28
|
+
*
|
|
29
|
+
* @throws Does not throw - errors are logged but swallowed to prevent disrupting the agent
|
|
30
|
+
*/
|
|
31
|
+
augmentation(req: IntegrationRequest): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves relevant memories for the given prompt and returns formatted context.
|
|
34
|
+
*
|
|
35
|
+
* @param promptText - The user's prompt/query
|
|
36
|
+
* @returns Formatted XML context string to inject, or undefined if no relevant memories found
|
|
37
|
+
*
|
|
38
|
+
* @throws Does not throw - errors are logged but swallowed, returns undefined on failure
|
|
39
|
+
*/
|
|
40
|
+
recall(promptText: string): Promise<string | undefined>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=openclaw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openclaw.d.ts","sourceRoot":"","sources":["../../src/integrations/openclaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD;;;;;;OAMG;IACI,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAMjE;;;;;OAKG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAK1C;;;;;;;OAOG;IACU,YAAY,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE;;;;;;;OAOG;IACU,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAGrE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { BaseIntegration } from './base.js';
|
|
2
|
+
/**
|
|
3
|
+
* OpenClaw-specific integration for Memori.
|
|
4
|
+
* Provides memory capture and recall functionality for OpenClaw agents.
|
|
5
|
+
*/
|
|
6
|
+
export class OpenClawIntegration extends BaseIntegration {
|
|
7
|
+
/**
|
|
8
|
+
* Sets the attribution context for memory operations.
|
|
9
|
+
*
|
|
10
|
+
* @param entityId - Unique identifier for the entity (required)
|
|
11
|
+
* @param processId - Optional identifier for the workflow/process/agent
|
|
12
|
+
* @returns This instance for method chaining
|
|
13
|
+
*/
|
|
14
|
+
setAttribution(entityId, processId) {
|
|
15
|
+
this.core.config.entityId = entityId;
|
|
16
|
+
if (processId)
|
|
17
|
+
this.core.config.processId = processId;
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Sets the current conversation session ID.
|
|
22
|
+
*
|
|
23
|
+
* @param sessionId - Unique session identifier
|
|
24
|
+
* @returns This instance for method chaining
|
|
25
|
+
*/
|
|
26
|
+
setSession(sessionId) {
|
|
27
|
+
this.core.session.set(sessionId);
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Captures a conversation turn and sends it to Memori for processing.
|
|
32
|
+
*
|
|
33
|
+
* @param req - The unified integration message containing user text, agent text, and metadata
|
|
34
|
+
* @returns Promise that resolves when capture is complete
|
|
35
|
+
*
|
|
36
|
+
* @throws Does not throw - errors are logged but swallowed to prevent disrupting the agent
|
|
37
|
+
*/
|
|
38
|
+
async augmentation(req) {
|
|
39
|
+
await this.executeAugmentation(req);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves relevant memories for the given prompt and returns formatted context.
|
|
43
|
+
*
|
|
44
|
+
* @param promptText - The user's prompt/query
|
|
45
|
+
* @returns Formatted XML context string to inject, or undefined if no relevant memories found
|
|
46
|
+
*
|
|
47
|
+
* @throws Does not throw - errors are logged but swallowed, returns undefined on failure
|
|
48
|
+
*/
|
|
49
|
+
async recall(promptText) {
|
|
50
|
+
return this.executeRecall(promptText);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=openclaw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openclaw.js","sourceRoot":"","sources":["../../src/integrations/openclaw.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD;;;;;;OAMG;IACI,cAAc,CAAC,QAAgB,EAAE,SAAkB;QACxD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACrC,IAAI,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,SAAiB;QACjC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,YAAY,CAAC,GAAuB;QAC/C,MAAM,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,MAAM,CAAC,UAAkB;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;CACF"}
|
package/dist/memori.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Axon } from '@memorilabs/axon';
|
|
|
2
2
|
import { Config } from './core/config.js';
|
|
3
3
|
import { SessionManager } from './core/session.js';
|
|
4
4
|
import { ParsedFact } from './types/api.js';
|
|
5
|
+
import { IntegrationConstructor, SupportedIntegration } from './types/integrations.js';
|
|
5
6
|
/**
|
|
6
7
|
* The main entry point for the Memori SDK.
|
|
7
8
|
*
|
|
@@ -71,5 +72,13 @@ export declare class Memori {
|
|
|
71
72
|
* @param id - The UUID of the session to resume.
|
|
72
73
|
*/
|
|
73
74
|
setSession(id: string): this;
|
|
75
|
+
/**
|
|
76
|
+
* Securely attaches a supported framework integration to this Memori instance.
|
|
77
|
+
*
|
|
78
|
+
* @typeParam T - The type of integration being created
|
|
79
|
+
* @param IntegrationClass - The integration class constructor to instantiate
|
|
80
|
+
* @returns A new instance of the specified integration with access to Memori's core engines
|
|
81
|
+
*/
|
|
82
|
+
integrate<T extends SupportedIntegration>(IntegrationClass: IntegrationConstructor<T>): T;
|
|
74
83
|
}
|
|
75
84
|
//# sourceMappingURL=memori.d.ts.map
|
package/dist/memori.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memori.d.ts","sourceRoot":"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AE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAIzD;;;OAGG;IACI,YAAY,IAAI,IAAI;IAK3B;;;;;OAKG;IACI,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKnC;;;;;;OAMG;IACI,SAAS,CAAC,CAAC,SAAS,oBAAoB,EAAE,gBAAgB,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,CAAC;CASjG"}
|
package/dist/memori.js
CHANGED
|
@@ -107,5 +107,21 @@ export class Memori {
|
|
|
107
107
|
this.session.set(id);
|
|
108
108
|
return this;
|
|
109
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Securely attaches a supported framework integration to this Memori instance.
|
|
112
|
+
*
|
|
113
|
+
* @typeParam T - The type of integration being created
|
|
114
|
+
* @param IntegrationClass - The integration class constructor to instantiate
|
|
115
|
+
* @returns A new instance of the specified integration with access to Memori's core engines
|
|
116
|
+
*/
|
|
117
|
+
integrate(IntegrationClass) {
|
|
118
|
+
return new IntegrationClass({
|
|
119
|
+
recall: this.recallEngine,
|
|
120
|
+
persistence: this.persistenceEngine,
|
|
121
|
+
augmentation: this.augmentationEngine,
|
|
122
|
+
config: this.config,
|
|
123
|
+
session: this.session,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
110
126
|
}
|
|
111
127
|
//# sourceMappingURL=memori.js.map
|
package/dist/memori.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memori.js","sourceRoot":"","sources":["../src/memori.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO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O,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CAAC,KAAa;QAC/B,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED;;;OAGG;IACI,YAAY;QACjB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,EAAU;QAC1B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACI,SAAS,CAAiC,gBAA2C;QAC1F,OAAO,IAAI,gBAAgB,CAAC;YAC1B,MAAM,EAAE,IAAI,CAAC,YAAY;YACzB,WAAW,EAAE,IAAI,CAAC,iBAAiB;YACnC,YAAY,EAAE,IAAI,CAAC,kBAAkB;YACrC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Config } from '../core/config.js';
|
|
2
|
+
import { SessionManager } from '../core/session.js';
|
|
3
|
+
import { RecallEngine } from '../engines/recall.js';
|
|
4
|
+
import { PersistenceEngine } from '../engines/persistence.js';
|
|
5
|
+
import { AugmentationEngine } from '../engines/augmentation.js';
|
|
6
|
+
import type { OpenClawIntegration } from '../integrations/openclaw.js';
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependency injection container passed to framework integrations.
|
|
9
|
+
* Provides access to Memori's core engines and configuration state.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export interface MemoriCore {
|
|
13
|
+
recall: RecallEngine;
|
|
14
|
+
persistence: PersistenceEngine;
|
|
15
|
+
augmentation: AugmentationEngine;
|
|
16
|
+
config: Config;
|
|
17
|
+
session: SessionManager;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents a single turn of conversation to be captured by Memori.
|
|
21
|
+
* This payload is used by framework integrations to send user and agent messages
|
|
22
|
+
* to the persistence and augmentation engines.
|
|
23
|
+
*/
|
|
24
|
+
export interface IntegrationRequest {
|
|
25
|
+
/**
|
|
26
|
+
* The raw text input provided by the user.
|
|
27
|
+
* @example "What is my favorite color?"
|
|
28
|
+
*/
|
|
29
|
+
userMessage: string;
|
|
30
|
+
/**
|
|
31
|
+
* The final text response generated by the AI agent.
|
|
32
|
+
* @example "Based on your past messages, your favorite color is blue."
|
|
33
|
+
*/
|
|
34
|
+
agentResponse: string;
|
|
35
|
+
/**
|
|
36
|
+
* Optional telemetry and contextual metadata about the LLM execution.
|
|
37
|
+
*/
|
|
38
|
+
metadata?: IntegrationMetadata;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Telemetry and execution metadata associated with a conversation turn.
|
|
42
|
+
* Used by Memori's Augmentation Engine to track usage patterns, model performance,
|
|
43
|
+
* and platform-specific metrics.
|
|
44
|
+
*/
|
|
45
|
+
export interface IntegrationMetadata {
|
|
46
|
+
/**
|
|
47
|
+
* The LLM provider used to generate the response.
|
|
48
|
+
* @example 'openai', 'anthropic', 'openclaw'
|
|
49
|
+
*/
|
|
50
|
+
provider: string | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The specific model identifier used for the completion.
|
|
53
|
+
* @example 'gpt-4o', 'claude-3.5-sonnet'
|
|
54
|
+
*/
|
|
55
|
+
model: string | null | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The version of the underlying LLM provider's SDK used, if available.
|
|
58
|
+
* @example '4.28.0'
|
|
59
|
+
*/
|
|
60
|
+
sdkVersion: string | null | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The version of the Memori integration or plugin capturing this data.
|
|
63
|
+
* @example '1.0.0-openclaw-plugin'
|
|
64
|
+
*/
|
|
65
|
+
integrationSdkVersion: string | null | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Theframework where the agent is running.
|
|
68
|
+
* @example 'openclaw'
|
|
69
|
+
*/
|
|
70
|
+
platform: string | null | undefined;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A union type representing all officially supported framework integrations.
|
|
74
|
+
* Used to strictly type the return value of the `memori.integrate()` method.
|
|
75
|
+
*/
|
|
76
|
+
export type SupportedIntegration = OpenClawIntegration;
|
|
77
|
+
/**
|
|
78
|
+
* Constructor signature for a Memori integration class.
|
|
79
|
+
* Ensures that all integrations can be instantiated with the `MemoriCore` DI container.
|
|
80
|
+
* @typeParam T - The specific type of the integration being constructed
|
|
81
|
+
*/
|
|
82
|
+
export type IntegrationConstructor<T extends SupportedIntegration> = new (core: MemoriCore) => T;
|
|
83
|
+
//# sourceMappingURL=integrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/types/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,YAAY,EAAE,kBAAkB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,cAAc,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEpC;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEtC;;;OAGG;IACH,qBAAqB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEjD;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,oBAAoB,IAAI,KAAK,IAAI,EAAE,UAAU,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/types/integrations.ts"],"names":[],"mappings":""}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = '0.0.
|
|
1
|
+
export const SDK_VERSION = '0.0.4';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memorilabs/memori",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "The official TypeScript SDK for Memori",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.js",
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./integrations": {
|
|
15
|
+
"import": "./dist/integrations/index.js",
|
|
16
|
+
"types": "./dist/integrations/index.d.ts"
|
|
13
17
|
}
|
|
14
18
|
},
|
|
15
19
|
"files": [
|