@tpsdev-ai/openclaw-flair 0.19.0 → 0.20.1
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/index.js +14 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -394,6 +394,14 @@ export default {
|
|
|
394
394
|
try {
|
|
395
395
|
const client = getCurrentClient();
|
|
396
396
|
const memId = `${client.agentId}-${Date.now()}`;
|
|
397
|
+
const result = await client.memory.write(text, {
|
|
398
|
+
id: memId,
|
|
399
|
+
tags,
|
|
400
|
+
durability: durability,
|
|
401
|
+
type: type,
|
|
402
|
+
dedup: !supersedes,
|
|
403
|
+
dedupThreshold: 0.7,
|
|
404
|
+
});
|
|
397
405
|
if (supersedes) {
|
|
398
406
|
try {
|
|
399
407
|
const old = await client.memory.get(supersedes);
|
|
@@ -405,18 +413,15 @@ export default {
|
|
|
405
413
|
supersededBy: memId,
|
|
406
414
|
});
|
|
407
415
|
}
|
|
416
|
+
else {
|
|
417
|
+
api.logger.warn(`openclaw-flair: supersede target ${supersedes} not found — new memory ${memId} written; nothing to close`);
|
|
418
|
+
}
|
|
408
419
|
}
|
|
409
|
-
catch {
|
|
420
|
+
catch (closeErr) {
|
|
421
|
+
api.logger.warn(`openclaw-flair: failed to close superseded memory ${supersedes} after writing ${memId}: ${closeErr.message} ` +
|
|
422
|
+
`(not lost — new record is safely written; old record remains active until retried)`);
|
|
410
423
|
}
|
|
411
424
|
}
|
|
412
|
-
const result = await client.memory.write(text, {
|
|
413
|
-
id: memId,
|
|
414
|
-
tags,
|
|
415
|
-
durability: durability,
|
|
416
|
-
type: type,
|
|
417
|
-
dedup: !supersedes,
|
|
418
|
-
dedupThreshold: 0.7,
|
|
419
|
-
});
|
|
420
425
|
const wasDeduplicated = result.deduplicated === true;
|
|
421
426
|
return {
|
|
422
427
|
content: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpsdev-ai/openclaw-flair",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "OpenClaw memory plugin for Flair — agent identity and semantic memory",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@sinclair/typebox": "0.34.48",
|
|
61
|
-
"@tpsdev-ai/flair-client": "0.
|
|
61
|
+
"@tpsdev-ai/flair-client": "0.20.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"typescript": "5.9.3"
|