@agentvault/agentvault 0.20.6 → 0.20.8
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/cli.js +9 -1
- package/dist/cli.js.map +2 -2
- package/dist/index.js +9 -1
- package/dist/index.js.map +2 -2
- package/dist/openclaw-entry.js +11 -5
- package/dist/openclaw-entry.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/openclaw-entry.js
CHANGED
|
@@ -4723,14 +4723,20 @@ async function _recallMemories(apiUrl, apiKey, hubId, query, limit = 5) {
|
|
|
4723
4723
|
return "";
|
|
4724
4724
|
}
|
|
4725
4725
|
}
|
|
4726
|
+
var _tmCfg = { u: "", k: "" };
|
|
4727
|
+
function _initTmCfg() {
|
|
4728
|
+
if (!_tmCfg.u) {
|
|
4729
|
+
_tmCfg.u = globalThis.process?.env?.TEAM_MEMORY_URL || "";
|
|
4730
|
+
_tmCfg.k = globalThis.process?.env?.TEAM_MEMORY_API_KEY || "";
|
|
4731
|
+
}
|
|
4732
|
+
}
|
|
4726
4733
|
async function _recallTeamMemory(query, limit = 5) {
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
if (!url || !key) return "";
|
|
4734
|
+
_initTmCfg();
|
|
4735
|
+
if (!_tmCfg.u || !_tmCfg.k) return "";
|
|
4730
4736
|
try {
|
|
4731
4737
|
const params = new URLSearchParams({ q: query, limit: String(limit), threshold: "0.5" });
|
|
4732
|
-
const resp = await fetch(`${
|
|
4733
|
-
headers: { "X-API-Key":
|
|
4738
|
+
const resp = await fetch(`${_tmCfg.u}/v1/memory/search?${params}`, {
|
|
4739
|
+
headers: { "X-API-Key": _tmCfg.k },
|
|
4734
4740
|
signal: AbortSignal.timeout(5e3)
|
|
4735
4741
|
});
|
|
4736
4742
|
if (!resp.ok) return "";
|