@signetai/connector-forge 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 +102 -6
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import { join as join6, resolve as resolve3 } from "node:path";
15
15
 
16
16
  // ../../../libs/connector-base/dist/index.js
17
17
  import { randomBytes } from "node:crypto";
18
- import { existsSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
18
+ import { existsSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
19
19
  import { homedir } from "node:os";
20
20
  import { dirname as dirname2, isAbsolute, join as join3, relative, sep } from "node:path";
21
21
  import { createRequire } from "node:module";
@@ -15731,6 +15731,34 @@ function up135(db) {
15731
15731
  ON memory_head_publications(agent_id, status, revision DESC);
15732
15732
  `);
15733
15733
  }
15734
+ function up136(db) {
15735
+ const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
15736
+ for (const [name, type] of [
15737
+ ["entry_id", "TEXT"],
15738
+ ["entry_text", "TEXT"],
15739
+ ["operation", "TEXT"],
15740
+ ["source_refs_json", "TEXT"],
15741
+ ["supporting_quotes_json", "TEXT"]
15742
+ ]) {
15743
+ if (!cols.has(name))
15744
+ db.exec(`ALTER TABLE memory_head_revisions ADD COLUMN ${name} ${type}`);
15745
+ }
15746
+ db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
15747
+ }
15748
+ function up137(db) {
15749
+ const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
15750
+ for (const [name, type] of [
15751
+ ["head_revision", "INTEGER"],
15752
+ ["head_hash", "TEXT"],
15753
+ ["head_added", "INTEGER NOT NULL DEFAULT 0"],
15754
+ ["head_updated", "INTEGER NOT NULL DEFAULT 0"],
15755
+ ["head_removed", "INTEGER NOT NULL DEFAULT 0"],
15756
+ ["head_deferred", "INTEGER NOT NULL DEFAULT 0"],
15757
+ ["head_no_op", "INTEGER NOT NULL DEFAULT 0"]
15758
+ ])
15759
+ if (!cols.has(name))
15760
+ db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${name} ${type}`);
15761
+ }
15734
15762
  var MIGRATIONS = [
15735
15763
  {
15736
15764
  version: 1,
@@ -16803,6 +16831,23 @@ var MIGRATIONS = [
16803
16831
  name: "memory-head-publication",
16804
16832
  up: up135,
16805
16833
  artifacts: { tables: ["memory_head_publications"] }
16834
+ },
16835
+ {
16836
+ version: 136,
16837
+ name: "memory-head-revisions",
16838
+ up: up136,
16839
+ artifacts: { tables: ["memory_head_revisions"] }
16840
+ },
16841
+ {
16842
+ version: 137,
16843
+ name: "dreaming-head-manifest",
16844
+ up: up137,
16845
+ artifacts: {
16846
+ columns: [
16847
+ { table: "dreaming_passes", column: "head_revision" },
16848
+ { table: "dreaming_passes", column: "head_hash" }
16849
+ ]
16850
+ }
16806
16851
  }
16807
16852
  ];
16808
16853
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -17387,6 +17432,12 @@ class BaseConnector {
17387
17432
  const cleaned = stripSignetBlock(raw);
17388
17433
  if (cleaned === raw)
17389
17434
  return null;
17435
+ const root = realpathSync(basePath);
17436
+ const parent = realpathSync(dirname2(agentsPath));
17437
+ const rel = relative(root, join3(parent, "AGENTS.md"));
17438
+ if (rel.startsWith("..") || isAbsolute(rel)) {
17439
+ throw new Error(`Target path escapes validated root: ${agentsPath}`);
17440
+ }
17390
17441
  const tmp = join3(basePath, `.${randomBytes(6).toString("hex")}.tmp`);
17391
17442
  try {
17392
17443
  writeFileSync(tmp, cleaned, "utf-8");
@@ -17541,7 +17592,7 @@ import { homedir as homedir52 } from "node:os";
17541
17592
  import { dirname as dirname42, join as join82, resolve as resolve22 } from "node:path";
17542
17593
  import { homedir as homedir62, platform as platform22 } from "node:os";
17543
17594
  import { basename as basename2, dirname as dirname52, resolve as resolve42 } from "node:path";
17544
- import { existsSync as existsSync12, readFileSync as readFileSync10, readdirSync as readdirSync5, realpathSync, statSync as statSync7 } from "node:fs";
17595
+ import { existsSync as existsSync12, readFileSync as readFileSync10, readdirSync as readdirSync5, realpathSync as realpathSync2, statSync as statSync7 } from "node:fs";
17545
17596
  import { dirname as dirname8, join as join13 } from "node:path";
17546
17597
  import { homedir as homedir102 } from "node:os";
17547
17598
  var __create = Object.create;
@@ -28901,7 +28952,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
28901
28952
  return true;
28902
28953
  return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
28903
28954
  }
28904
- function up136(db) {
28955
+ function up138(db) {
28905
28956
  db.exec(`
28906
28957
  CREATE TABLE IF NOT EXISTS schema_migrations (
28907
28958
  version INTEGER PRIMARY KEY,
@@ -29385,7 +29436,7 @@ function addColumnIfMissing52(db, table, column, definition) {
29385
29436
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
29386
29437
  }
29387
29438
  }
29388
- function up137(db) {
29439
+ function up139(db) {
29389
29440
  db.exec(`
29390
29441
  CREATE TABLE IF NOT EXISTS ingestion_jobs (
29391
29442
  id TEXT PRIMARY KEY,
@@ -33226,11 +33277,39 @@ function up1352(db) {
33226
33277
  ON memory_head_publications(agent_id, status, revision DESC);
33227
33278
  `);
33228
33279
  }
33280
+ function up1362(db) {
33281
+ const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r3) => r3.name));
33282
+ for (const [name, type] of [
33283
+ ["entry_id", "TEXT"],
33284
+ ["entry_text", "TEXT"],
33285
+ ["operation", "TEXT"],
33286
+ ["source_refs_json", "TEXT"],
33287
+ ["supporting_quotes_json", "TEXT"]
33288
+ ]) {
33289
+ if (!cols.has(name))
33290
+ db.exec(`ALTER TABLE memory_head_revisions ADD COLUMN ${name} ${type}`);
33291
+ }
33292
+ db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
33293
+ }
33294
+ function up1372(db) {
33295
+ const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r3) => r3.name));
33296
+ for (const [name, type] of [
33297
+ ["head_revision", "INTEGER"],
33298
+ ["head_hash", "TEXT"],
33299
+ ["head_added", "INTEGER NOT NULL DEFAULT 0"],
33300
+ ["head_updated", "INTEGER NOT NULL DEFAULT 0"],
33301
+ ["head_removed", "INTEGER NOT NULL DEFAULT 0"],
33302
+ ["head_deferred", "INTEGER NOT NULL DEFAULT 0"],
33303
+ ["head_no_op", "INTEGER NOT NULL DEFAULT 0"]
33304
+ ])
33305
+ if (!cols.has(name))
33306
+ db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${name} ${type}`);
33307
+ }
33229
33308
  var MIGRATIONS2 = [
33230
33309
  {
33231
33310
  version: 1,
33232
33311
  name: "baseline",
33233
- up: up136,
33312
+ up: up138,
33234
33313
  artifacts: { tables: ["memories", "conversations", "embeddings"] }
33235
33314
  },
33236
33315
  {
@@ -33308,7 +33387,7 @@ var MIGRATIONS2 = [
33308
33387
  {
33309
33388
  version: 13,
33310
33389
  name: "ingestion-tracking",
33311
- up: up137,
33390
+ up: up139,
33312
33391
  artifacts: {
33313
33392
  columns: [
33314
33393
  { table: "memories", column: "source_path" },
@@ -34298,6 +34377,23 @@ var MIGRATIONS2 = [
34298
34377
  name: "memory-head-publication",
34299
34378
  up: up1352,
34300
34379
  artifacts: { tables: ["memory_head_publications"] }
34380
+ },
34381
+ {
34382
+ version: 136,
34383
+ name: "memory-head-revisions",
34384
+ up: up1362,
34385
+ artifacts: { tables: ["memory_head_revisions"] }
34386
+ },
34387
+ {
34388
+ version: 137,
34389
+ name: "dreaming-head-manifest",
34390
+ up: up1372,
34391
+ artifacts: {
34392
+ columns: [
34393
+ { table: "dreaming_passes", column: "head_revision" },
34394
+ { table: "dreaming_passes", column: "head_hash" }
34395
+ ]
34396
+ }
34301
34397
  }
34302
34398
  ];
34303
34399
  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-forge",
3
- "version": "0.207.2",
3
+ "version": "0.208.0",
4
4
  "description": "Signet connector for ForgeCode - installs MCP, identity, and skills integration",
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",