@signetai/connector-base 0.179.2 → 0.181.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 +30 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10435,6 +10435,24 @@ function up111(db) {
10435
10435
  }
10436
10436
  }
10437
10437
  }
10438
+ function hasColumn20(db, table, column) {
10439
+ const rows = db.prepare(`PRAGMA table_info(${table})`).all();
10440
+ return rows.some((row) => row.name === column);
10441
+ }
10442
+ function addColumnIfMissing23(db, column, definition) {
10443
+ if (!hasColumn20(db, "telemetry_events", column)) {
10444
+ db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
10445
+ }
10446
+ }
10447
+ function up112(db) {
10448
+ addColumnIfMissing23(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
10449
+ addColumnIfMissing23(db, "claim_token", "TEXT");
10450
+ addColumnIfMissing23(db, "claimed_at", "TEXT");
10451
+ db.exec(`
10452
+ CREATE INDEX IF NOT EXISTS idx_telemetry_events_queue
10453
+ ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
10454
+ `);
10455
+ }
10438
10456
  var MIGRATIONS = [
10439
10457
  {
10440
10458
  version: 1,
@@ -11321,6 +11339,18 @@ var MIGRATIONS = [
11321
11339
  { table: "telemetry_install", column: "first_recall_at" }
11322
11340
  ]
11323
11341
  }
11342
+ },
11343
+ {
11344
+ version: 112,
11345
+ name: "telemetry-queue-ownership",
11346
+ up: up112,
11347
+ artifacts: {
11348
+ columns: [
11349
+ { table: "telemetry_events", column: "source" },
11350
+ { table: "telemetry_events", column: "claim_token" },
11351
+ { table: "telemetry_events", column: "claimed_at" }
11352
+ ]
11353
+ }
11324
11354
  }
11325
11355
  ];
11326
11356
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-base",
3
- "version": "0.179.2",
3
+ "version": "0.181.0",
4
4
  "description": "Base class for Signet harness connectors",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsc --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@signetai/core": "0.179.2",
29
+ "@signetai/core": "0.181.0",
30
30
  "json5": "^2.2.3",
31
31
  "jsonc-parser": "3.3.1"
32
32
  },