@signetai/signet-memory-openclaw 0.123.3 → 0.123.11
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 +42 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,8 +22,8 @@ import { join as join2 } from "node:path";
|
|
|
22
22
|
|
|
23
23
|
// ../../../platform/core/dist/index.js
|
|
24
24
|
import { createRequire as createRequire2 } from "node:module";
|
|
25
|
-
import {
|
|
26
|
-
import { fileURLToPath } from "url";
|
|
25
|
+
import { dirname, join } from "node:path";
|
|
26
|
+
import { fileURLToPath } from "node:url";
|
|
27
27
|
import { createRequire as createRequire22 } from "node:module";
|
|
28
28
|
import { existsSync as existsSync10, readFileSync as readFileSync8, readdirSync as readdirSync4, realpathSync, statSync as statSync4 } from "node:fs";
|
|
29
29
|
import { dirname as dirname6, join as join10 } from "node:path";
|
|
@@ -9304,6 +9304,34 @@ function up71(db) {
|
|
|
9304
9304
|
ON epistemic_assertions(agent_id, claim_attribute_id);
|
|
9305
9305
|
`);
|
|
9306
9306
|
}
|
|
9307
|
+
function ensureMemoriesScopeColumns2(db) {
|
|
9308
|
+
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
9309
|
+
const names = new Set(cols.map((col) => col.name).filter((name) => typeof name === "string"));
|
|
9310
|
+
if (!names.has("agent_id"))
|
|
9311
|
+
db.exec("ALTER TABLE memories ADD COLUMN agent_id TEXT DEFAULT 'default'");
|
|
9312
|
+
if (!names.has("visibility"))
|
|
9313
|
+
db.exec("ALTER TABLE memories ADD COLUMN visibility TEXT DEFAULT 'global'");
|
|
9314
|
+
if (!names.has("scope"))
|
|
9315
|
+
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
9316
|
+
if (!names.has("idempotency_key"))
|
|
9317
|
+
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
9318
|
+
if (!names.has("runtime_path"))
|
|
9319
|
+
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
9320
|
+
}
|
|
9321
|
+
function up72(db) {
|
|
9322
|
+
ensureMemoriesScopeColumns2(db);
|
|
9323
|
+
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
9324
|
+
db.exec(`
|
|
9325
|
+
CREATE UNIQUE INDEX idx_memories_idempotency_key
|
|
9326
|
+
ON memories(
|
|
9327
|
+
idempotency_key,
|
|
9328
|
+
COALESCE(NULLIF(agent_id, ''), 'default'),
|
|
9329
|
+
COALESCE(visibility, 'global'),
|
|
9330
|
+
COALESCE(scope, '__NULL__')
|
|
9331
|
+
)
|
|
9332
|
+
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
9333
|
+
`);
|
|
9334
|
+
}
|
|
9307
9335
|
var MIGRATIONS = [
|
|
9308
9336
|
{
|
|
9309
9337
|
version: 1,
|
|
@@ -9865,6 +9893,17 @@ var MIGRATIONS = [
|
|
|
9865
9893
|
artifacts: {
|
|
9866
9894
|
tables: ["epistemic_assertions"]
|
|
9867
9895
|
}
|
|
9896
|
+
},
|
|
9897
|
+
{
|
|
9898
|
+
version: 72,
|
|
9899
|
+
name: "agent-scoped-idempotency-key",
|
|
9900
|
+
up: up72,
|
|
9901
|
+
artifacts: {
|
|
9902
|
+
columns: [
|
|
9903
|
+
{ table: "memories", column: "idempotency_key" },
|
|
9904
|
+
{ table: "memories", column: "runtime_path" }
|
|
9905
|
+
]
|
|
9906
|
+
}
|
|
9868
9907
|
}
|
|
9869
9908
|
];
|
|
9870
9909
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -10046,6 +10085,7 @@ function buildRememberRequestBody(content, options = {}) {
|
|
|
10046
10085
|
pinned: options.pinned === true ? true : undefined,
|
|
10047
10086
|
sourceType: options.sourceType,
|
|
10048
10087
|
sourceId: options.sourceId,
|
|
10088
|
+
sourcePath: options.sourcePath,
|
|
10049
10089
|
createdAt: options.createdAt,
|
|
10050
10090
|
hints: options.hints,
|
|
10051
10091
|
transcript: options.transcript,
|