memory-search-plugin 0.8.0 → 0.10.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/index.js +7 -3
- package/openclaw.plugin.json +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -161,7 +161,9 @@ var index_default = definePluginEntry({
|
|
|
161
161
|
register(api) {
|
|
162
162
|
const gatewayUrl = api.pluginConfig?.gatewayUrl || "http://localhost:18790";
|
|
163
163
|
const gatewayToken = api.pluginConfig?.gatewayToken || "";
|
|
164
|
-
|
|
164
|
+
const ocToken = process.env.OPENCLAW_GATEWAY_TOKEN || "";
|
|
165
|
+
const releaseName = ocToken.startsWith("oc-") ? ocToken.slice(3) : "";
|
|
166
|
+
console.log("[memory-search-plugin] gatewayUrl:", gatewayUrl, "releaseName:", releaseName);
|
|
165
167
|
const gateway = createGatewayClient({ gatewayUrl, gatewayToken });
|
|
166
168
|
api.registerMemoryPromptSection(buildPromptSection);
|
|
167
169
|
api.registerTool(
|
|
@@ -219,7 +221,7 @@ var index_default = definePluginEntry({
|
|
|
219
221
|
group_id: params.group_id
|
|
220
222
|
}) : fallbackIdentity || resolveIdentityFromParams({});
|
|
221
223
|
console.log(
|
|
222
|
-
`[memory-search-plugin] search: agent_id=${agentId} scene=${identity.scene} user_id=${identity.user_id} group_id=${identity.group_id} (source=${params.sender_id ? "llm_params" : "fallback"})`
|
|
224
|
+
`[memory-search-plugin] search: agent_id=${agentId} scene=${identity.scene} user_id=${identity.user_id} group_id=${identity.group_id} release_name=${releaseName} (source=${params.sender_id ? "llm_params" : "fallback"})`
|
|
223
225
|
);
|
|
224
226
|
try {
|
|
225
227
|
const data = await gateway.callGatewaySearch({
|
|
@@ -228,6 +230,7 @@ var index_default = definePluginEntry({
|
|
|
228
230
|
query,
|
|
229
231
|
scene: identity.scene,
|
|
230
232
|
group_id: identity.group_id,
|
|
233
|
+
release_name: releaseName || undefined,
|
|
231
234
|
limit: params.maxResults || 20,
|
|
232
235
|
threshold: params.minScore || 0.3
|
|
233
236
|
});
|
|
@@ -334,7 +337,7 @@ var index_default = definePluginEntry({
|
|
|
334
337
|
group_id: params.group_id
|
|
335
338
|
}) : fallbackIdentity || resolveIdentityFromParams({});
|
|
336
339
|
console.log(
|
|
337
|
-
`[memory-search-plugin] get: path=${path} agent_id=${agentId} scene=${identity.scene} user_id=${identity.user_id} (source=${params.sender_id ? "llm_params" : "fallback"})`
|
|
340
|
+
`[memory-search-plugin] get: path=${path} agent_id=${agentId} scene=${identity.scene} user_id=${identity.user_id} release_name=${releaseName} (source=${params.sender_id ? "llm_params" : "fallback"})`
|
|
338
341
|
);
|
|
339
342
|
try {
|
|
340
343
|
const data = await gateway.callGatewayGet({
|
|
@@ -343,6 +346,7 @@ var index_default = definePluginEntry({
|
|
|
343
346
|
path,
|
|
344
347
|
scene: identity.scene,
|
|
345
348
|
group_id: identity.group_id,
|
|
349
|
+
release_name: releaseName || undefined,
|
|
346
350
|
from: params.from,
|
|
347
351
|
lines: params.lines
|
|
348
352
|
});
|
package/openclaw.plugin.json
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"name": "Memory Search Plugin",
|
|
4
4
|
"description": "Routes memory_search to external Memory Search Gateway with ACL, memory_get with path routing",
|
|
5
5
|
"kind": "memory",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.8.0",
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"additionalProperties": false,
|
|
10
10
|
"properties": {
|
|
11
11
|
"gatewayUrl": {
|
|
12
12
|
"type": "string",
|
|
13
|
-
"description": "Memory Search Gateway API 地址,如 http://
|
|
13
|
+
"description": "Memory Search Gateway API 地址,如 http://your-host:8888"
|
|
14
14
|
},
|
|
15
15
|
"gatewayToken": {
|
|
16
16
|
"type": "string",
|