@foxlight-foundation/foxmemory-plugin-v2 1.0.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/.github/workflows/publish.yml +33 -0
- package/LICENSE +30 -0
- package/README.md +189 -0
- package/dist/index.js +1231 -0
- package/index.ts +1526 -0
- package/openclaw.plugin.json +184 -0
- package/package.json +29 -0
- package/tsconfig.json +20 -0
- package/typings/external.d.ts +20 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "foxmemory-plugin-v2",
|
|
3
|
+
"kind": "memory",
|
|
4
|
+
"uiHints": {
|
|
5
|
+
"mode": {
|
|
6
|
+
"label": "Mode",
|
|
7
|
+
"help": "\"platform\" for Mem0 cloud, \"open-source\" for self-hosted"
|
|
8
|
+
},
|
|
9
|
+
"apiKey": {
|
|
10
|
+
"label": "Mem0 API Key",
|
|
11
|
+
"sensitive": true,
|
|
12
|
+
"placeholder": "m0-...",
|
|
13
|
+
"help": "API key from app.mem0.ai (or use ${MEM0_API_KEY}). Only needed for platform mode without baseUrl."
|
|
14
|
+
},
|
|
15
|
+
"userId": {
|
|
16
|
+
"label": "Default User ID",
|
|
17
|
+
"placeholder": "default",
|
|
18
|
+
"help": "User ID for scoping memories"
|
|
19
|
+
},
|
|
20
|
+
"orgId": {
|
|
21
|
+
"label": "Organization ID",
|
|
22
|
+
"placeholder": "org-...",
|
|
23
|
+
"advanced": true
|
|
24
|
+
},
|
|
25
|
+
"projectId": {
|
|
26
|
+
"label": "Project ID",
|
|
27
|
+
"placeholder": "proj-...",
|
|
28
|
+
"advanced": true
|
|
29
|
+
},
|
|
30
|
+
"autoCapture": {
|
|
31
|
+
"label": "Auto-Capture",
|
|
32
|
+
"help": "Automatically store conversation context after each agent turn"
|
|
33
|
+
},
|
|
34
|
+
"autoRecall": {
|
|
35
|
+
"label": "Auto-Recall",
|
|
36
|
+
"help": "Automatically inject relevant memories before each agent turn"
|
|
37
|
+
},
|
|
38
|
+
"customInstructions": {
|
|
39
|
+
"label": "Custom Instructions",
|
|
40
|
+
"placeholder": "Only store user preferences and important facts...",
|
|
41
|
+
"help": "Natural language rules for what Mem0 should store or exclude (platform mode)"
|
|
42
|
+
},
|
|
43
|
+
"customCategories": {
|
|
44
|
+
"label": "Custom Categories",
|
|
45
|
+
"advanced": true,
|
|
46
|
+
"help": "Map of category names to descriptions for memory tagging (platform mode only). Sensible defaults are built in."
|
|
47
|
+
},
|
|
48
|
+
"customPrompt": {
|
|
49
|
+
"label": "Custom Prompt (Open-Source)",
|
|
50
|
+
"advanced": true,
|
|
51
|
+
"help": "Custom prompt for open-source mode memory extraction."
|
|
52
|
+
},
|
|
53
|
+
"enableGraph": {
|
|
54
|
+
"label": "Enable Graph Memory",
|
|
55
|
+
"help": "Enable Mem0 graph memory for entity relationships (platform mode only)"
|
|
56
|
+
},
|
|
57
|
+
"searchThreshold": {
|
|
58
|
+
"label": "Search Threshold",
|
|
59
|
+
"placeholder": "0.5",
|
|
60
|
+
"help": "Minimum similarity score for search results (0-1). Default: 0.5"
|
|
61
|
+
},
|
|
62
|
+
"topK": {
|
|
63
|
+
"label": "Top K Results",
|
|
64
|
+
"placeholder": "5",
|
|
65
|
+
"help": "Maximum number of memories to retrieve"
|
|
66
|
+
},
|
|
67
|
+
"oss": {
|
|
68
|
+
"label": "Open-Source Configuration",
|
|
69
|
+
"advanced": true,
|
|
70
|
+
"help": "Optional. Configure custom embedder, vector store, LLM, or history DB for open-source mode. Has sensible defaults \u2014 only override what you need."
|
|
71
|
+
},
|
|
72
|
+
"baseUrl": {
|
|
73
|
+
"label": "FoxMemory Base URL",
|
|
74
|
+
"placeholder": "http://your-foxmemory-host:8082",
|
|
75
|
+
"help": "If set, plugin uses foxmemory HTTP v2 endpoints instead of Mem0 SDK providers."
|
|
76
|
+
},
|
|
77
|
+
"requestTimeoutMs": {
|
|
78
|
+
"label": "Request Timeout (ms)",
|
|
79
|
+
"placeholder": "10000",
|
|
80
|
+
"advanced": true
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"configSchema": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"mode": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"enum": [
|
|
90
|
+
"platform",
|
|
91
|
+
"open-source",
|
|
92
|
+
"oss"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"apiKey": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
"userId": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
},
|
|
101
|
+
"orgId": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"projectId": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"autoCapture": {
|
|
108
|
+
"type": "boolean"
|
|
109
|
+
},
|
|
110
|
+
"autoRecall": {
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
"customInstructions": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
"customCategories": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"customPrompt": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"enableGraph": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
128
|
+
"searchThreshold": {
|
|
129
|
+
"type": "number"
|
|
130
|
+
},
|
|
131
|
+
"topK": {
|
|
132
|
+
"type": "number"
|
|
133
|
+
},
|
|
134
|
+
"oss": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"properties": {
|
|
137
|
+
"embedder": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"provider": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"config": {
|
|
144
|
+
"type": "object"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"vectorStore": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"properties": {
|
|
151
|
+
"provider": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"config": {
|
|
155
|
+
"type": "object"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"llm": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"properties": {
|
|
162
|
+
"provider": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"config": {
|
|
166
|
+
"type": "object"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"historyDbPath": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"baseUrl": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
},
|
|
178
|
+
"requestTimeoutMs": {
|
|
179
|
+
"type": "number"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"required": []
|
|
183
|
+
}
|
|
184
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@foxlight-foundation/foxmemory-plugin-v2",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "OpenClaw memory plugin backed by the FoxMemory HTTP v2 API (Qdrant + Neo4j)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prepublishOnly": "yarn build"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"openclaw",
|
|
13
|
+
"memory",
|
|
14
|
+
"mem0",
|
|
15
|
+
"foxmemory",
|
|
16
|
+
"qdrant",
|
|
17
|
+
"neo4j"
|
|
18
|
+
],
|
|
19
|
+
"author": "Foxlight contributors",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"type": "commonjs",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@sinclair/typebox": "^0.34.48"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^20.0.0",
|
|
27
|
+
"typescript": "^5.4.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"lib": ["ES2020", "DOM"],
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"rootDir": ".",
|
|
9
|
+
"strict": false,
|
|
10
|
+
"noImplicitAny": false,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"declarationMap": true,
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"typeRoots": ["./typings", "./node_modules/@types"]
|
|
17
|
+
},
|
|
18
|
+
"include": ["index.ts", "typings/**/*.d.ts"],
|
|
19
|
+
"exclude": ["node_modules", "dist"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Stub type declarations for runtime-provided / optional dependencies.
|
|
2
|
+
// These modules are either supplied by the OpenClaw host at runtime or
|
|
3
|
+
// loaded lazily; they are not installed as build-time dependencies.
|
|
4
|
+
|
|
5
|
+
declare module "openclaw/plugin-sdk" {
|
|
6
|
+
export interface OpenClawPluginApi {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module "mem0ai" {
|
|
12
|
+
const MemoryClient: any;
|
|
13
|
+
export default MemoryClient;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module "mem0ai/oss" {
|
|
17
|
+
const MemoryClient: any;
|
|
18
|
+
export const Memory: any;
|
|
19
|
+
export default MemoryClient;
|
|
20
|
+
}
|