@signetai/core 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 CHANGED
@@ -11224,6 +11224,52 @@ function up115(db) {
11224
11224
  `);
11225
11225
  }
11226
11226
 
11227
+ // src/migrations/116-acp-delivery-reconciliation.ts
11228
+ function hasColumn21(db, table, column) {
11229
+ return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
11230
+ }
11231
+ function addColumnIfMissing24(db, column, definition) {
11232
+ if (!hasColumn21(db, "cross_agent_messages", column)) {
11233
+ db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
11234
+ }
11235
+ }
11236
+ function up116(db) {
11237
+ const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
11238
+ if (table == null)
11239
+ return;
11240
+ addColumnIfMissing24(db, "delivery_state", "TEXT NOT NULL DEFAULT 'pending'");
11241
+ addColumnIfMissing24(db, "delivery_attempt_id", "TEXT");
11242
+ addColumnIfMissing24(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
11243
+ addColumnIfMissing24(db, "delivery_lease_token", "TEXT");
11244
+ addColumnIfMissing24(db, "delivery_lease_expires_at", "TEXT");
11245
+ addColumnIfMissing24(db, "delivery_attempt_started_at", "TEXT");
11246
+ addColumnIfMissing24(db, "delivery_updated_at", "TEXT");
11247
+ addColumnIfMissing24(db, "acp_base_url", "TEXT");
11248
+ addColumnIfMissing24(db, "acp_target_agent_name", "TEXT");
11249
+ addColumnIfMissing24(db, "acp_timeout_ms", "INTEGER");
11250
+ addColumnIfMissing24(db, "acp_metadata_json", "TEXT");
11251
+ db.exec(`
11252
+ UPDATE cross_agent_messages
11253
+ SET delivery_state = CASE delivery_status
11254
+ WHEN 'delivered' THEN 'delivered'
11255
+ WHEN 'failed' THEN 'failed'
11256
+ ELSE 'pending'
11257
+ END
11258
+ WHERE delivery_state = 'pending';
11259
+
11260
+ UPDATE cross_agent_messages
11261
+ SET delivery_attempt_id = id
11262
+ WHERE delivery_attempt_id IS NULL;
11263
+
11264
+ UPDATE cross_agent_messages
11265
+ SET delivery_updated_at = created_at
11266
+ WHERE delivery_updated_at IS NULL;
11267
+
11268
+ CREATE INDEX IF NOT EXISTS idx_cross_agent_messages_delivery_reconciliation
11269
+ ON cross_agent_messages(delivery_path, delivery_state, delivery_lease_expires_at, delivery_updated_at);
11270
+ `);
11271
+ }
11272
+
11227
11273
  // src/migrations/index.ts
11228
11274
  var MIGRATIONS = [
11229
11275
  {
@@ -12150,6 +12196,20 @@ var MIGRATIONS = [
12150
12196
  artifacts: {
12151
12197
  tables: ["cross_agent_messages", "cross_agent_message_receipts"]
12152
12198
  }
12199
+ },
12200
+ {
12201
+ version: 116,
12202
+ name: "acp-delivery-reconciliation",
12203
+ up: up116,
12204
+ artifacts: {
12205
+ columns: [
12206
+ { table: "cross_agent_messages", column: "delivery_state" },
12207
+ { table: "cross_agent_messages", column: "delivery_attempt_id" },
12208
+ { table: "cross_agent_messages", column: "delivery_lease_expires_at" },
12209
+ { table: "cross_agent_messages", column: "acp_base_url" },
12210
+ { table: "cross_agent_messages", column: "acp_target_agent_name" }
12211
+ ]
12212
+ }
12153
12213
  }
12154
12214
  ];
12155
12215
  function checksum(m) {
@@ -0,0 +1,11 @@
1
+ import type { MigrationDb } from "./index";
2
+ /**
3
+ * Migration 116: durable ACP relay attempt reconciliation (#1263).
4
+ *
5
+ * The existing delivery_status column is kept for compatibility with clients
6
+ * that only understand queued/delivered/failed. delivery_state carries the
7
+ * finer-grained crash-window state and the lease fields prevent another
8
+ * daemon from declaring an active relay abandoned.
9
+ */
10
+ export declare function up(db: MigrationDb): void;
11
+ //# sourceMappingURL=116-acp-delivery-reconciliation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"116-acp-delivery-reconciliation.d.ts","sourceRoot":"","sources":["../../src/migrations/116-acp-delivery-reconciliation.ts"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,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAED,oEAAoE;AACpE,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EA+6B1C,CAAC;AAqOF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAiB7D;AAED,6CAA6C;AAC7C,eAAO,MAAM,qBAAqB,QAAkD,CAAC;AAsBrF;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAiDnD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/core",
3
- "version": "0.184.1",
3
+ "version": "0.185.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Core library for Signet - portable AI agent identity",
6
6
  "type": "module",