@signetai/connector-base 0.184.1 → 0.185.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 +58 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10532,6 +10532,50 @@ function up115(db) {
|
|
|
10532
10532
|
ON cross_agent_message_receipts(agent_id, acknowledged_at, message_id);
|
|
10533
10533
|
`);
|
|
10534
10534
|
}
|
|
10535
|
+
function hasColumn21(db, table, column) {
|
|
10536
|
+
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
10537
|
+
}
|
|
10538
|
+
function addColumnIfMissing24(db, column, definition) {
|
|
10539
|
+
if (!hasColumn21(db, "cross_agent_messages", column)) {
|
|
10540
|
+
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
10541
|
+
}
|
|
10542
|
+
}
|
|
10543
|
+
function up116(db) {
|
|
10544
|
+
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
10545
|
+
if (table == null)
|
|
10546
|
+
return;
|
|
10547
|
+
addColumnIfMissing24(db, "delivery_state", "TEXT NOT NULL DEFAULT 'pending'");
|
|
10548
|
+
addColumnIfMissing24(db, "delivery_attempt_id", "TEXT");
|
|
10549
|
+
addColumnIfMissing24(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
10550
|
+
addColumnIfMissing24(db, "delivery_lease_token", "TEXT");
|
|
10551
|
+
addColumnIfMissing24(db, "delivery_lease_expires_at", "TEXT");
|
|
10552
|
+
addColumnIfMissing24(db, "delivery_attempt_started_at", "TEXT");
|
|
10553
|
+
addColumnIfMissing24(db, "delivery_updated_at", "TEXT");
|
|
10554
|
+
addColumnIfMissing24(db, "acp_base_url", "TEXT");
|
|
10555
|
+
addColumnIfMissing24(db, "acp_target_agent_name", "TEXT");
|
|
10556
|
+
addColumnIfMissing24(db, "acp_timeout_ms", "INTEGER");
|
|
10557
|
+
addColumnIfMissing24(db, "acp_metadata_json", "TEXT");
|
|
10558
|
+
db.exec(`
|
|
10559
|
+
UPDATE cross_agent_messages
|
|
10560
|
+
SET delivery_state = CASE delivery_status
|
|
10561
|
+
WHEN 'delivered' THEN 'delivered'
|
|
10562
|
+
WHEN 'failed' THEN 'failed'
|
|
10563
|
+
ELSE 'pending'
|
|
10564
|
+
END
|
|
10565
|
+
WHERE delivery_state = 'pending';
|
|
10566
|
+
|
|
10567
|
+
UPDATE cross_agent_messages
|
|
10568
|
+
SET delivery_attempt_id = id
|
|
10569
|
+
WHERE delivery_attempt_id IS NULL;
|
|
10570
|
+
|
|
10571
|
+
UPDATE cross_agent_messages
|
|
10572
|
+
SET delivery_updated_at = created_at
|
|
10573
|
+
WHERE delivery_updated_at IS NULL;
|
|
10574
|
+
|
|
10575
|
+
CREATE INDEX IF NOT EXISTS idx_cross_agent_messages_delivery_reconciliation
|
|
10576
|
+
ON cross_agent_messages(delivery_path, delivery_state, delivery_lease_expires_at, delivery_updated_at);
|
|
10577
|
+
`);
|
|
10578
|
+
}
|
|
10535
10579
|
var MIGRATIONS = [
|
|
10536
10580
|
{
|
|
10537
10581
|
version: 1,
|
|
@@ -11457,6 +11501,20 @@ var MIGRATIONS = [
|
|
|
11457
11501
|
artifacts: {
|
|
11458
11502
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
11459
11503
|
}
|
|
11504
|
+
},
|
|
11505
|
+
{
|
|
11506
|
+
version: 116,
|
|
11507
|
+
name: "acp-delivery-reconciliation",
|
|
11508
|
+
up: up116,
|
|
11509
|
+
artifacts: {
|
|
11510
|
+
columns: [
|
|
11511
|
+
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
11512
|
+
{ table: "cross_agent_messages", column: "delivery_attempt_id" },
|
|
11513
|
+
{ table: "cross_agent_messages", column: "delivery_lease_expires_at" },
|
|
11514
|
+
{ table: "cross_agent_messages", column: "acp_base_url" },
|
|
11515
|
+
{ table: "cross_agent_messages", column: "acp_target_agent_name" }
|
|
11516
|
+
]
|
|
11517
|
+
}
|
|
11460
11518
|
}
|
|
11461
11519
|
];
|
|
11462
11520
|
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.185.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.185.0",
|
|
30
30
|
"json5": "^2.2.3",
|
|
31
31
|
"jsonc-parser": "3.3.1"
|
|
32
32
|
},
|