@signetai/connector-base 0.150.5 → 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.
- package/dist/index.js +97 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9878,6 +9878,79 @@ function up87(db) {
|
|
|
9878
9878
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
9879
9879
|
`);
|
|
9880
9880
|
}
|
|
9881
|
+
function up88(db) {
|
|
9882
|
+
db.exec(`
|
|
9883
|
+
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
9884
|
+
agent_id TEXT NOT NULL,
|
|
9885
|
+
source_path TEXT NOT NULL,
|
|
9886
|
+
harness TEXT NOT NULL,
|
|
9887
|
+
size_bytes INTEGER NOT NULL,
|
|
9888
|
+
mtime_ms INTEGER NOT NULL,
|
|
9889
|
+
content_sha256 TEXT NOT NULL,
|
|
9890
|
+
session_id TEXT NOT NULL,
|
|
9891
|
+
last_scanned_at TEXT NOT NULL,
|
|
9892
|
+
PRIMARY KEY (agent_id, source_path)
|
|
9893
|
+
);
|
|
9894
|
+
|
|
9895
|
+
CREATE INDEX IF NOT EXISTS idx_transcript_capture_jobs_agent_session_id
|
|
9896
|
+
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
9897
|
+
`);
|
|
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
|
+
}
|
|
9881
9954
|
var MIGRATIONS = [
|
|
9882
9955
|
{
|
|
9883
9956
|
version: 1,
|
|
@@ -10589,6 +10662,30 @@ var MIGRATIONS = [
|
|
|
10589
10662
|
artifacts: {
|
|
10590
10663
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
10591
10664
|
}
|
|
10665
|
+
},
|
|
10666
|
+
{
|
|
10667
|
+
version: 88,
|
|
10668
|
+
name: "transcript-recovery-files",
|
|
10669
|
+
up: up88,
|
|
10670
|
+
artifacts: {
|
|
10671
|
+
tables: ["transcript_recovery_files"]
|
|
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
|
+
}
|
|
10592
10689
|
}
|
|
10593
10690
|
];
|
|
10594
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.
|
|
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.
|
|
25
|
+
"@signetai/core": "0.152.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.0.0",
|