@signetai/signet-memory-openclaw 0.109.22 → 0.110.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.
Files changed (2) hide show
  1. package/dist/index.js +65 -7
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -25,9 +25,9 @@ import { createRequire as createRequire2 } from "node:module";
25
25
  import { join, dirname } from "path";
26
26
  import { fileURLToPath } from "url";
27
27
  import { createRequire as createRequire22 } from "node:module";
28
- import { existsSync as existsSync8, readFileSync as readFileSync6, readdirSync as readdirSync4, realpathSync, statSync as statSync3 } from "node:fs";
29
- import { dirname as dirname5, join as join9 } from "node:path";
30
- import { homedir as homedir6 } from "node:os";
28
+ import { existsSync as existsSync9, readFileSync as readFileSync7, readdirSync as readdirSync4, realpathSync, statSync as statSync4 } from "node:fs";
29
+ import { dirname as dirname6, join as join9 } from "node:path";
30
+ import { homedir as homedir7 } from "node:os";
31
31
  var __create = Object.create;
32
32
  var __getProtoOf = Object.getPrototypeOf;
33
33
  var __defProp2 = Object.defineProperty;
@@ -9129,6 +9129,43 @@ function up63(db) {
9129
9129
  END;
9130
9130
  `);
9131
9131
  }
9132
+ function hasColumn6(db, table, column) {
9133
+ const rows = db.prepare(`PRAGMA table_info(${table})`).all();
9134
+ return rows.some((row) => row.name === column);
9135
+ }
9136
+ function addColumnIfMissing18(db, table, column, definition) {
9137
+ if (!hasColumn6(db, table, column)) {
9138
+ db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
9139
+ }
9140
+ }
9141
+ function up64(db) {
9142
+ for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
9143
+ addColumnIfMissing18(db, table, "source_id", "TEXT");
9144
+ addColumnIfMissing18(db, table, "source_kind", "TEXT");
9145
+ addColumnIfMissing18(db, table, "source_path", "TEXT");
9146
+ addColumnIfMissing18(db, table, "source_root", "TEXT");
9147
+ }
9148
+ db.exec("CREATE INDEX IF NOT EXISTS idx_entities_source ON entities(agent_id, source_id, source_path)");
9149
+ db.exec("CREATE INDEX IF NOT EXISTS idx_entity_communities_source ON entity_communities(agent_id, source_id, source_path)");
9150
+ db.exec("CREATE INDEX IF NOT EXISTS idx_entity_attributes_source ON entity_attributes(agent_id, source_id, source_path)");
9151
+ db.exec("CREATE INDEX IF NOT EXISTS idx_entity_dependencies_source_origin ON entity_dependencies(agent_id, source_id, source_path)");
9152
+ }
9153
+ function hasTable2(db, table) {
9154
+ const row = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = ?").get(table);
9155
+ return row?.name === table;
9156
+ }
9157
+ function hasColumn7(db, table, column) {
9158
+ const rows = db.prepare(`PRAGMA table_info(${table})`).all();
9159
+ return rows.some((row) => row.name === column);
9160
+ }
9161
+ function up65(db) {
9162
+ if (!hasTable2(db, "embeddings"))
9163
+ return;
9164
+ if (!hasColumn7(db, "embeddings", "agent_id")) {
9165
+ db.exec("ALTER TABLE embeddings ADD COLUMN agent_id TEXT");
9166
+ }
9167
+ db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
9168
+ }
9132
9169
  var MIGRATIONS = [
9133
9170
  {
9134
9171
  version: 1,
@@ -9623,6 +9660,27 @@ var MIGRATIONS = [
9623
9660
  version: 63,
9624
9661
  name: "content-only-memories-fts-update",
9625
9662
  up: up63
9663
+ },
9664
+ {
9665
+ version: 64,
9666
+ name: "source-graph-provenance",
9667
+ up: up64,
9668
+ artifacts: {
9669
+ columns: [
9670
+ { table: "entities", column: "source_path" },
9671
+ { table: "entity_communities", column: "source_path" },
9672
+ { table: "entity_attributes", column: "source_path" },
9673
+ { table: "entity_dependencies", column: "source_path" }
9674
+ ]
9675
+ }
9676
+ },
9677
+ {
9678
+ version: 65,
9679
+ name: "source-embedding-agent-scope",
9680
+ up: up65,
9681
+ artifacts: {
9682
+ columns: [{ table: "embeddings", column: "agent_id", optional: true }]
9683
+ }
9626
9684
  }
9627
9685
  ];
9628
9686
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -9894,15 +9952,15 @@ function resolveSessionStartTimeoutMs(raw) {
9894
9952
  return ms;
9895
9953
  }
9896
9954
  function readStaticIdentity(agentsDir, status = STATIC_IDENTITY_OFFLINE_STATUS) {
9897
- if (!existsSync8(agentsDir))
9955
+ if (!existsSync9(agentsDir))
9898
9956
  return null;
9899
9957
  const parts = [];
9900
9958
  for (const { file, header, budget } of STATIC_BUDGETS) {
9901
9959
  const path = join9(agentsDir, file);
9902
- if (!existsSync8(path))
9960
+ if (!existsSync9(path))
9903
9961
  continue;
9904
9962
  try {
9905
- const raw = readFileSync6(path, "utf-8").trim();
9963
+ const raw = readFileSync7(path, "utf-8").trim();
9906
9964
  if (!raw)
9907
9965
  continue;
9908
9966
  const content = raw.length <= budget ? raw : `${raw.slice(0, budget)}
@@ -9920,7 +9978,7 @@ ${parts.join(`
9920
9978
 
9921
9979
  `)}`;
9922
9980
  }
9923
- var home = homedir6();
9981
+ var home = homedir7();
9924
9982
  var import_yaml2 = __toESM(require_dist(), 1);
9925
9983
  var SKIP_SUBTYPES = new Set([
9926
9984
  "channel_join",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/signet-memory-openclaw",
3
- "version": "0.109.22",
3
+ "version": "0.110.1",
4
4
  "description": "Signet adapter for OpenClaw — runtime plugin for AI agent memory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "@sinclair/typebox": "0.34.47"
37
37
  },
38
38
  "devDependencies": {
39
- "@signet/core": "0.109.22",
39
+ "@signet/core": "0.110.1",
40
40
  "@types/node": "^22.0.0"
41
41
  },
42
42
  "peerDependencies": {