@signetai/connector-base 0.151.0 → 0.152.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 +71 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -9896,6 +9896,61 @@ function up88(db) {
9896
9896
  ON transcript_capture_jobs(agent_id, session_id, status);
9897
9897
  `);
9898
9898
  }
9899
+ function up89(db) {
9900
+ db.exec(`
9901
+ CREATE TABLE IF NOT EXISTS job_cancellations (
9902
+ id TEXT PRIMARY KEY,
9903
+ source_table TEXT NOT NULL,
9904
+ source_id TEXT NOT NULL,
9905
+ status_before TEXT NOT NULL,
9906
+ payload_json TEXT NOT NULL,
9907
+ reason TEXT,
9908
+ actor TEXT NOT NULL,
9909
+ actor_type TEXT NOT NULL,
9910
+ request_id TEXT,
9911
+ created_at TEXT NOT NULL
9912
+ )
9913
+ `);
9914
+ if (!indexExists(db, "job_cancellations", "idx_job_cancellations_source")) {
9915
+ db.exec(`CREATE INDEX IF NOT EXISTS idx_job_cancellations_source
9916
+ ON job_cancellations(source_table, source_id)`);
9917
+ }
9918
+ if (!indexExists(db, "job_cancellations", "idx_job_cancellations_created_at")) {
9919
+ db.exec(`CREATE INDEX IF NOT EXISTS idx_job_cancellations_created_at
9920
+ ON job_cancellations(created_at)`);
9921
+ }
9922
+ }
9923
+ function indexExists(db, table, indexName) {
9924
+ const rows = db.prepare(`PRAGMA index_list(${table})`).all();
9925
+ return rows.some((row) => row.name === indexName);
9926
+ }
9927
+ function up90(db) {
9928
+ db.exec(`
9929
+ CREATE TABLE IF NOT EXISTS job_archive (
9930
+ id TEXT PRIMARY KEY,
9931
+ source_table TEXT NOT NULL,
9932
+ source_id TEXT NOT NULL,
9933
+ status TEXT NOT NULL,
9934
+ payload_json TEXT NOT NULL,
9935
+ archived_at TEXT NOT NULL,
9936
+ archived_by TEXT NOT NULL,
9937
+ reason TEXT,
9938
+ created_at TEXT NOT NULL
9939
+ )
9940
+ `);
9941
+ if (!indexExists2(db, "job_archive", "idx_job_archive_source")) {
9942
+ db.exec(`CREATE INDEX IF NOT EXISTS idx_job_archive_source
9943
+ ON job_archive(source_table, source_id)`);
9944
+ }
9945
+ if (!indexExists2(db, "job_archive", "idx_job_archive_archived_at")) {
9946
+ db.exec(`CREATE INDEX IF NOT EXISTS idx_job_archive_archived_at
9947
+ ON job_archive(archived_at)`);
9948
+ }
9949
+ }
9950
+ function indexExists2(db, table, indexName) {
9951
+ const rows = db.prepare(`PRAGMA index_list(${table})`).all();
9952
+ return rows.some((row) => row.name === indexName);
9953
+ }
9899
9954
  var MIGRATIONS = [
9900
9955
  {
9901
9956
  version: 1,
@@ -10615,6 +10670,22 @@ var MIGRATIONS = [
10615
10670
  artifacts: {
10616
10671
  tables: ["transcript_recovery_files"]
10617
10672
  }
10673
+ },
10674
+ {
10675
+ version: 89,
10676
+ name: "job-cancellations",
10677
+ up: up89,
10678
+ artifacts: {
10679
+ tables: ["job_cancellations"]
10680
+ }
10681
+ },
10682
+ {
10683
+ version: 90,
10684
+ name: "job-archive",
10685
+ up: up90,
10686
+ artifacts: {
10687
+ tables: ["job_archive"]
10688
+ }
10618
10689
  }
10619
10690
  ];
10620
10691
  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.151.0",
3
+ "version": "0.152.0",
4
4
  "description": "Base class for Signet harness connectors",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "typecheck": "tsc --noEmit"
23
23
  },
24
24
  "dependencies": {
25
- "@signetai/core": "0.151.0"
25
+ "@signetai/core": "0.152.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",