@signetai/connector-base 0.188.2 → 0.189.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.
- package/dist/index.js +43 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10840,6 +10840,35 @@ function up120(db) {
|
|
|
10840
10840
|
ON source_lifecycle_state(agent_id, source_class, first_searchable_at, first_recall_at);
|
|
10841
10841
|
`);
|
|
10842
10842
|
}
|
|
10843
|
+
function hasColumn23(db, table, column) {
|
|
10844
|
+
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
10845
|
+
}
|
|
10846
|
+
function addColumnIfMissing26(db, column, definition) {
|
|
10847
|
+
if (!hasColumn23(db, "telemetry_events", column)) {
|
|
10848
|
+
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
10849
|
+
}
|
|
10850
|
+
}
|
|
10851
|
+
function up121(db) {
|
|
10852
|
+
addColumnIfMissing26(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
10853
|
+
addColumnIfMissing26(db, "last_attempt_at", "TEXT");
|
|
10854
|
+
addColumnIfMissing26(db, "sent_at", "TEXT");
|
|
10855
|
+
addColumnIfMissing26(db, "last_failure_code", "TEXT");
|
|
10856
|
+
db.exec(`
|
|
10857
|
+
CREATE TABLE IF NOT EXISTS telemetry_delivery_state (
|
|
10858
|
+
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
10859
|
+
window_started_at TEXT NOT NULL,
|
|
10860
|
+
success_count INTEGER NOT NULL DEFAULT 0,
|
|
10861
|
+
failure_count INTEGER NOT NULL DEFAULT 0,
|
|
10862
|
+
consecutive_failures INTEGER NOT NULL DEFAULT 0,
|
|
10863
|
+
last_attempt_at TEXT,
|
|
10864
|
+
last_success_at TEXT,
|
|
10865
|
+
last_failure_code TEXT,
|
|
10866
|
+
dropped_event_count INTEGER NOT NULL DEFAULT 0
|
|
10867
|
+
);
|
|
10868
|
+
INSERT OR IGNORE INTO telemetry_delivery_state (id, window_started_at)
|
|
10869
|
+
VALUES (1, CURRENT_TIMESTAMP);
|
|
10870
|
+
`);
|
|
10871
|
+
}
|
|
10843
10872
|
var MIGRATIONS = [
|
|
10844
10873
|
{
|
|
10845
10874
|
version: 1,
|
|
@@ -11807,6 +11836,20 @@ var MIGRATIONS = [
|
|
|
11807
11836
|
name: "source-lifecycle-telemetry",
|
|
11808
11837
|
up: up120,
|
|
11809
11838
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
11839
|
+
},
|
|
11840
|
+
{
|
|
11841
|
+
version: 121,
|
|
11842
|
+
name: "telemetry-delivery-health",
|
|
11843
|
+
up: up121,
|
|
11844
|
+
artifacts: {
|
|
11845
|
+
tables: ["telemetry_delivery_state"],
|
|
11846
|
+
columns: [
|
|
11847
|
+
{ table: "telemetry_events", column: "delivery_attempts" },
|
|
11848
|
+
{ table: "telemetry_events", column: "last_attempt_at" },
|
|
11849
|
+
{ table: "telemetry_events", column: "sent_at" },
|
|
11850
|
+
{ table: "telemetry_events", column: "last_failure_code" }
|
|
11851
|
+
]
|
|
11852
|
+
}
|
|
11810
11853
|
}
|
|
11811
11854
|
];
|
|
11812
11855
|
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.
|
|
3
|
+
"version": "0.189.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.
|
|
29
|
+
"@signetai/core": "0.189.0",
|
|
30
30
|
"json5": "^2.2.3",
|
|
31
31
|
"jsonc-parser": "3.3.1"
|
|
32
32
|
},
|