@signetai/connector-openclaw 0.207.2 → 0.208.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 +101 -5
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { delimiter, join as join4, resolve } from "node:path";
5
5
 
6
6
  // ../../../libs/connector-base/dist/index.js
7
7
  import { randomBytes } from "node:crypto";
8
- import { existsSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
8
+ import { existsSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
9
9
  import { dirname as dirname2, isAbsolute, join as join3, relative, sep } from "node:path";
10
10
  import { createRequire } from "node:module";
11
11
  import { dirname, join } from "node:path";
@@ -15704,6 +15704,34 @@ function up135(db) {
15704
15704
  ON memory_head_publications(agent_id, status, revision DESC);
15705
15705
  `);
15706
15706
  }
15707
+ function up136(db) {
15708
+ const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
15709
+ for (const [name, type] of [
15710
+ ["entry_id", "TEXT"],
15711
+ ["entry_text", "TEXT"],
15712
+ ["operation", "TEXT"],
15713
+ ["source_refs_json", "TEXT"],
15714
+ ["supporting_quotes_json", "TEXT"]
15715
+ ]) {
15716
+ if (!cols.has(name))
15717
+ db.exec(`ALTER TABLE memory_head_revisions ADD COLUMN ${name} ${type}`);
15718
+ }
15719
+ db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
15720
+ }
15721
+ function up137(db) {
15722
+ const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
15723
+ for (const [name, type] of [
15724
+ ["head_revision", "INTEGER"],
15725
+ ["head_hash", "TEXT"],
15726
+ ["head_added", "INTEGER NOT NULL DEFAULT 0"],
15727
+ ["head_updated", "INTEGER NOT NULL DEFAULT 0"],
15728
+ ["head_removed", "INTEGER NOT NULL DEFAULT 0"],
15729
+ ["head_deferred", "INTEGER NOT NULL DEFAULT 0"],
15730
+ ["head_no_op", "INTEGER NOT NULL DEFAULT 0"]
15731
+ ])
15732
+ if (!cols.has(name))
15733
+ db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${name} ${type}`);
15734
+ }
15707
15735
  var MIGRATIONS = [
15708
15736
  {
15709
15737
  version: 1,
@@ -16776,6 +16804,23 @@ var MIGRATIONS = [
16776
16804
  name: "memory-head-publication",
16777
16805
  up: up135,
16778
16806
  artifacts: { tables: ["memory_head_publications"] }
16807
+ },
16808
+ {
16809
+ version: 136,
16810
+ name: "memory-head-revisions",
16811
+ up: up136,
16812
+ artifacts: { tables: ["memory_head_revisions"] }
16813
+ },
16814
+ {
16815
+ version: 137,
16816
+ name: "dreaming-head-manifest",
16817
+ up: up137,
16818
+ artifacts: {
16819
+ columns: [
16820
+ { table: "dreaming_passes", column: "head_revision" },
16821
+ { table: "dreaming_passes", column: "head_hash" }
16822
+ ]
16823
+ }
16779
16824
  }
16780
16825
  ];
16781
16826
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -17171,6 +17216,12 @@ class BaseConnector {
17171
17216
  const cleaned = stripSignetBlock(raw);
17172
17217
  if (cleaned === raw)
17173
17218
  return null;
17219
+ const root = realpathSync(basePath);
17220
+ const parent = realpathSync(dirname2(agentsPath));
17221
+ const rel = relative(root, join3(parent, "AGENTS.md"));
17222
+ if (rel.startsWith("..") || isAbsolute(rel)) {
17223
+ throw new Error(`Target path escapes validated root: ${agentsPath}`);
17224
+ }
17174
17225
  const tmp = join3(basePath, `.${randomBytes(6).toString("hex")}.tmp`);
17175
17226
  try {
17176
17227
  writeFileSync(tmp, cleaned, "utf-8");
@@ -30612,7 +30663,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
30612
30663
  return true;
30613
30664
  return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
30614
30665
  }
30615
- function up136(db) {
30666
+ function up138(db) {
30616
30667
  db.exec(`
30617
30668
  CREATE TABLE IF NOT EXISTS schema_migrations (
30618
30669
  version INTEGER PRIMARY KEY,
@@ -31096,7 +31147,7 @@ function addColumnIfMissing52(db, table, column, definition) {
31096
31147
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
31097
31148
  }
31098
31149
  }
31099
- function up137(db) {
31150
+ function up139(db) {
31100
31151
  db.exec(`
31101
31152
  CREATE TABLE IF NOT EXISTS ingestion_jobs (
31102
31153
  id TEXT PRIMARY KEY,
@@ -34937,11 +34988,39 @@ function up1352(db) {
34937
34988
  ON memory_head_publications(agent_id, status, revision DESC);
34938
34989
  `);
34939
34990
  }
34991
+ function up1362(db) {
34992
+ const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r3) => r3.name));
34993
+ for (const [name, type] of [
34994
+ ["entry_id", "TEXT"],
34995
+ ["entry_text", "TEXT"],
34996
+ ["operation", "TEXT"],
34997
+ ["source_refs_json", "TEXT"],
34998
+ ["supporting_quotes_json", "TEXT"]
34999
+ ]) {
35000
+ if (!cols.has(name))
35001
+ db.exec(`ALTER TABLE memory_head_revisions ADD COLUMN ${name} ${type}`);
35002
+ }
35003
+ db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
35004
+ }
35005
+ function up1372(db) {
35006
+ const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r3) => r3.name));
35007
+ for (const [name, type] of [
35008
+ ["head_revision", "INTEGER"],
35009
+ ["head_hash", "TEXT"],
35010
+ ["head_added", "INTEGER NOT NULL DEFAULT 0"],
35011
+ ["head_updated", "INTEGER NOT NULL DEFAULT 0"],
35012
+ ["head_removed", "INTEGER NOT NULL DEFAULT 0"],
35013
+ ["head_deferred", "INTEGER NOT NULL DEFAULT 0"],
35014
+ ["head_no_op", "INTEGER NOT NULL DEFAULT 0"]
35015
+ ])
35016
+ if (!cols.has(name))
35017
+ db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${name} ${type}`);
35018
+ }
34940
35019
  var MIGRATIONS2 = [
34941
35020
  {
34942
35021
  version: 1,
34943
35022
  name: "baseline",
34944
- up: up136,
35023
+ up: up138,
34945
35024
  artifacts: { tables: ["memories", "conversations", "embeddings"] }
34946
35025
  },
34947
35026
  {
@@ -35019,7 +35098,7 @@ var MIGRATIONS2 = [
35019
35098
  {
35020
35099
  version: 13,
35021
35100
  name: "ingestion-tracking",
35022
- up: up137,
35101
+ up: up139,
35023
35102
  artifacts: {
35024
35103
  columns: [
35025
35104
  { table: "memories", column: "source_path" },
@@ -36009,6 +36088,23 @@ var MIGRATIONS2 = [
36009
36088
  name: "memory-head-publication",
36010
36089
  up: up1352,
36011
36090
  artifacts: { tables: ["memory_head_publications"] }
36091
+ },
36092
+ {
36093
+ version: 136,
36094
+ name: "memory-head-revisions",
36095
+ up: up1362,
36096
+ artifacts: { tables: ["memory_head_revisions"] }
36097
+ },
36098
+ {
36099
+ version: 137,
36100
+ name: "dreaming-head-manifest",
36101
+ up: up1372,
36102
+ artifacts: {
36103
+ columns: [
36104
+ { table: "dreaming_passes", column: "head_revision" },
36105
+ { table: "dreaming_passes", column: "head_hash" }
36106
+ ]
36107
+ }
36012
36108
  }
36013
36109
  ];
36014
36110
  var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-openclaw",
3
- "version": "0.207.2",
3
+ "version": "0.208.1",
4
4
  "description": "Signet connector for OpenClaw - configures workspace and memory hooks",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "test": "bun test"
26
26
  },
27
27
  "dependencies": {
28
- "@signetai/connector-base": "0.207.2",
29
- "@signetai/core": "0.207.2"
28
+ "@signetai/connector-base": "0.208.1",
29
+ "@signetai/core": "0.208.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",