@signetai/connector-base 0.167.0 → 0.168.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 +31 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10377,6 +10377,23 @@ function up106(db) {
10377
10377
  }
10378
10378
  db.exec("CREATE INDEX IF NOT EXISTS idx_memories_review_after ON memories(review_after);");
10379
10379
  }
10380
+ function hasColumn18(db, table, column) {
10381
+ return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
10382
+ }
10383
+ var TOKEN_COLUMNS = [
10384
+ ["tokens_input", "INTEGER"],
10385
+ ["tokens_output", "INTEGER"],
10386
+ ["tokens_cache_read", "INTEGER"],
10387
+ ["tokens_cache_write", "INTEGER"],
10388
+ ["tokens_cost", "REAL"]
10389
+ ];
10390
+ function up107(db) {
10391
+ for (const [column, type] of TOKEN_COLUMNS) {
10392
+ if (!hasColumn18(db, "dreaming_passes", column)) {
10393
+ db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
10394
+ }
10395
+ }
10396
+ }
10380
10397
  var MIGRATIONS = [
10381
10398
  {
10382
10399
  version: 1,
@@ -11217,6 +11234,20 @@ var MIGRATIONS = [
11217
11234
  artifacts: {
11218
11235
  columns: [{ table: "memories", column: "review_after" }]
11219
11236
  }
11237
+ },
11238
+ {
11239
+ version: 107,
11240
+ name: "dreaming-pass-usage",
11241
+ up: up107,
11242
+ artifacts: {
11243
+ columns: [
11244
+ { table: "dreaming_passes", column: "tokens_input" },
11245
+ { table: "dreaming_passes", column: "tokens_output" },
11246
+ { table: "dreaming_passes", column: "tokens_cache_read" },
11247
+ { table: "dreaming_passes", column: "tokens_cache_write" },
11248
+ { table: "dreaming_passes", column: "tokens_cost" }
11249
+ ]
11250
+ }
11220
11251
  }
11221
11252
  ];
11222
11253
  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.167.0",
3
+ "version": "0.168.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.167.0",
29
+ "@signetai/core": "0.168.0",
30
30
  "json5": "^2.2.3",
31
31
  "jsonc-parser": "3.3.1"
32
32
  },