@signetai/connector-claude-code 0.207.2 → 0.208.0

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
@@ -6,7 +6,7 @@ import { join as join4 } from "node:path";
6
6
 
7
7
  // ../../../libs/connector-base/dist/index.js
8
8
  import { randomBytes } from "node:crypto";
9
- import { existsSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
9
+ import { existsSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
10
10
  import { dirname as dirname2, isAbsolute, join as join3, relative, sep } from "node:path";
11
11
  import { createRequire } from "node:module";
12
12
  import { dirname, join } from "node:path";
@@ -15705,6 +15705,34 @@ function up135(db) {
15705
15705
  ON memory_head_publications(agent_id, status, revision DESC);
15706
15706
  `);
15707
15707
  }
15708
+ function up136(db) {
15709
+ const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
15710
+ for (const [name, type] of [
15711
+ ["entry_id", "TEXT"],
15712
+ ["entry_text", "TEXT"],
15713
+ ["operation", "TEXT"],
15714
+ ["source_refs_json", "TEXT"],
15715
+ ["supporting_quotes_json", "TEXT"]
15716
+ ]) {
15717
+ if (!cols.has(name))
15718
+ db.exec(`ALTER TABLE memory_head_revisions ADD COLUMN ${name} ${type}`);
15719
+ }
15720
+ db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
15721
+ }
15722
+ function up137(db) {
15723
+ const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
15724
+ for (const [name, type] of [
15725
+ ["head_revision", "INTEGER"],
15726
+ ["head_hash", "TEXT"],
15727
+ ["head_added", "INTEGER NOT NULL DEFAULT 0"],
15728
+ ["head_updated", "INTEGER NOT NULL DEFAULT 0"],
15729
+ ["head_removed", "INTEGER NOT NULL DEFAULT 0"],
15730
+ ["head_deferred", "INTEGER NOT NULL DEFAULT 0"],
15731
+ ["head_no_op", "INTEGER NOT NULL DEFAULT 0"]
15732
+ ])
15733
+ if (!cols.has(name))
15734
+ db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${name} ${type}`);
15735
+ }
15708
15736
  var MIGRATIONS = [
15709
15737
  {
15710
15738
  version: 1,
@@ -16777,6 +16805,23 @@ var MIGRATIONS = [
16777
16805
  name: "memory-head-publication",
16778
16806
  up: up135,
16779
16807
  artifacts: { tables: ["memory_head_publications"] }
16808
+ },
16809
+ {
16810
+ version: 136,
16811
+ name: "memory-head-revisions",
16812
+ up: up136,
16813
+ artifacts: { tables: ["memory_head_revisions"] }
16814
+ },
16815
+ {
16816
+ version: 137,
16817
+ name: "dreaming-head-manifest",
16818
+ up: up137,
16819
+ artifacts: {
16820
+ columns: [
16821
+ { table: "dreaming_passes", column: "head_revision" },
16822
+ { table: "dreaming_passes", column: "head_hash" }
16823
+ ]
16824
+ }
16780
16825
  }
16781
16826
  ];
16782
16827
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -17172,6 +17217,12 @@ class BaseConnector {
17172
17217
  const cleaned = stripSignetBlock(raw);
17173
17218
  if (cleaned === raw)
17174
17219
  return null;
17220
+ const root = realpathSync(basePath);
17221
+ const parent = realpathSync(dirname2(agentsPath));
17222
+ const rel = relative(root, join3(parent, "AGENTS.md"));
17223
+ if (rel.startsWith("..") || isAbsolute(rel)) {
17224
+ throw new Error(`Target path escapes validated root: ${agentsPath}`);
17225
+ }
17175
17226
  const tmp = join3(basePath, `.${randomBytes(6).toString("hex")}.tmp`);
17176
17227
  try {
17177
17228
  writeFileSync(tmp, cleaned, "utf-8");
@@ -28640,7 +28691,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
28640
28691
  return true;
28641
28692
  return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
28642
28693
  }
28643
- function up136(db) {
28694
+ function up138(db) {
28644
28695
  db.exec(`
28645
28696
  CREATE TABLE IF NOT EXISTS schema_migrations (
28646
28697
  version INTEGER PRIMARY KEY,
@@ -29124,7 +29175,7 @@ function addColumnIfMissing52(db, table, column, definition) {
29124
29175
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
29125
29176
  }
29126
29177
  }
29127
- function up137(db) {
29178
+ function up139(db) {
29128
29179
  db.exec(`
29129
29180
  CREATE TABLE IF NOT EXISTS ingestion_jobs (
29130
29181
  id TEXT PRIMARY KEY,
@@ -32965,11 +33016,39 @@ function up1352(db) {
32965
33016
  ON memory_head_publications(agent_id, status, revision DESC);
32966
33017
  `);
32967
33018
  }
33019
+ function up1362(db) {
33020
+ const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r3) => r3.name));
33021
+ for (const [name, type] of [
33022
+ ["entry_id", "TEXT"],
33023
+ ["entry_text", "TEXT"],
33024
+ ["operation", "TEXT"],
33025
+ ["source_refs_json", "TEXT"],
33026
+ ["supporting_quotes_json", "TEXT"]
33027
+ ]) {
33028
+ if (!cols.has(name))
33029
+ db.exec(`ALTER TABLE memory_head_revisions ADD COLUMN ${name} ${type}`);
33030
+ }
33031
+ db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
33032
+ }
33033
+ function up1372(db) {
33034
+ const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r3) => r3.name));
33035
+ for (const [name, type] of [
33036
+ ["head_revision", "INTEGER"],
33037
+ ["head_hash", "TEXT"],
33038
+ ["head_added", "INTEGER NOT NULL DEFAULT 0"],
33039
+ ["head_updated", "INTEGER NOT NULL DEFAULT 0"],
33040
+ ["head_removed", "INTEGER NOT NULL DEFAULT 0"],
33041
+ ["head_deferred", "INTEGER NOT NULL DEFAULT 0"],
33042
+ ["head_no_op", "INTEGER NOT NULL DEFAULT 0"]
33043
+ ])
33044
+ if (!cols.has(name))
33045
+ db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${name} ${type}`);
33046
+ }
32968
33047
  var MIGRATIONS2 = [
32969
33048
  {
32970
33049
  version: 1,
32971
33050
  name: "baseline",
32972
- up: up136,
33051
+ up: up138,
32973
33052
  artifacts: { tables: ["memories", "conversations", "embeddings"] }
32974
33053
  },
32975
33054
  {
@@ -33047,7 +33126,7 @@ var MIGRATIONS2 = [
33047
33126
  {
33048
33127
  version: 13,
33049
33128
  name: "ingestion-tracking",
33050
- up: up137,
33129
+ up: up139,
33051
33130
  artifacts: {
33052
33131
  columns: [
33053
33132
  { table: "memories", column: "source_path" },
@@ -34037,6 +34116,23 @@ var MIGRATIONS2 = [
34037
34116
  name: "memory-head-publication",
34038
34117
  up: up1352,
34039
34118
  artifacts: { tables: ["memory_head_publications"] }
34119
+ },
34120
+ {
34121
+ version: 136,
34122
+ name: "memory-head-revisions",
34123
+ up: up1362,
34124
+ artifacts: { tables: ["memory_head_revisions"] }
34125
+ },
34126
+ {
34127
+ version: 137,
34128
+ name: "dreaming-head-manifest",
34129
+ up: up1372,
34130
+ artifacts: {
34131
+ columns: [
34132
+ { table: "dreaming_passes", column: "head_revision" },
34133
+ { table: "dreaming_passes", column: "head_hash" }
34134
+ ]
34135
+ }
34040
34136
  }
34041
34137
  ];
34042
34138
  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-claude-code",
3
- "version": "0.207.2",
3
+ "version": "0.208.0",
4
4
  "description": "Signet connector for Claude Code (Anthropic CLI)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@signetai/connector-base": "0.207.2",
28
- "@signetai/core": "0.207.2"
27
+ "@signetai/connector-base": "0.208.0",
28
+ "@signetai/core": "0.208.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",