@a2a-exposed/control-core 0.8.17 → 0.8.18
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 +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3016,6 +3016,9 @@ var conversation_peer_default = "-- A wake is one peer's conversation. Two peers
|
|
|
3016
3016
|
// sql-raw:/home/runner/work/a2a-exposed/a2a-exposed/worker/migrations/0011_conversation_owner.sql
|
|
3017
3017
|
var conversation_owner_default = "-- One owner per context id. The first peer to insert the row keeps it (ON CONFLICT DO NOTHING).\nCREATE TABLE conversation_owners (\n context_id TEXT NOT NULL PRIMARY KEY,\n peer TEXT NOT NULL,\n created_at TEXT NOT NULL\n);\nINSERT INTO conversation_owners (context_id, peer, created_at)\nSELECT t.context_id, t.peer, t.created_at\nFROM tasks t\nWHERE t.peer IS NOT NULL AND t.peer != ''\n AND NOT EXISTS (\n SELECT 1 FROM tasks t2\n WHERE t2.context_id = t.context_id AND t2.peer IS NOT NULL AND t2.peer != ''\n AND (t2.created_at < t.created_at OR (t2.created_at = t.created_at AND t2.id < t.id))\n );\nINSERT INTO conversation_owners (context_id, peer, created_at)\nSELECT h.context_id, h.peer, h.ts\nFROM history h\nWHERE h.peer IS NOT NULL AND h.peer != ''\n AND NOT EXISTS (SELECT 1 FROM conversation_owners o WHERE o.context_id = h.context_id)\n AND NOT EXISTS (\n SELECT 1 FROM history h2\n WHERE h2.context_id = h.context_id AND h2.peer IS NOT NULL AND h2.peer != '' AND h2.seq < h.seq\n );\nINSERT INTO conversation_owners (context_id, peer, created_at)\nSELECT o.context_id, o.peer, o.sent_at\nFROM outbound o\nWHERE o.peer IS NOT NULL AND o.peer != ''\n AND NOT EXISTS (SELECT 1 FROM conversation_owners c WHERE c.context_id = o.context_id)\n AND NOT EXISTS (\n SELECT 1 FROM outbound o2\n WHERE o2.context_id = o.context_id AND o2.peer IS NOT NULL AND o2.peer != ''\n AND (o2.sent_at < o.sent_at OR (o2.sent_at = o.sent_at AND o2.task_id < o.task_id))\n );\n";
|
|
3018
3018
|
|
|
3019
|
+
// sql-raw:/home/runner/work/a2a-exposed/a2a-exposed/worker/migrations/0012_conversation_peer_owner.sql
|
|
3020
|
+
var conversation_peer_owner_default = "-- One row per peer. The same context id can be a separate conversation for each peer.\n-- 0011's single-column primary key made a second peer's insert fail, which is how a caller\n-- could tell a fresh id from one another peer already held.\nCREATE TABLE conversation_owners_peer (\n context_id TEXT NOT NULL,\n peer TEXT NOT NULL,\n created_at TEXT NOT NULL,\n PRIMARY KEY (context_id, peer)\n);\nINSERT INTO conversation_owners_peer (context_id, peer, created_at)\nSELECT context_id, peer, created_at FROM conversation_owners;\nDROP TABLE conversation_owners;\nALTER TABLE conversation_owners_peer RENAME TO conversation_owners;\n";
|
|
3021
|
+
|
|
3019
3022
|
// src/provision/inbox-migrations.ts
|
|
3020
3023
|
var INBOX_MIGRATIONS = [
|
|
3021
3024
|
{ name: "0001_init.sql", sql: init_default },
|
|
@@ -3028,7 +3031,8 @@ var INBOX_MIGRATIONS = [
|
|
|
3028
3031
|
{ name: "0008_oidc_txns.sql", sql: oidc_txns_default },
|
|
3029
3032
|
{ name: "0009_outbound_seen.sql", sql: outbound_seen_default },
|
|
3030
3033
|
{ name: "0010_conversation_peer.sql", sql: conversation_peer_default },
|
|
3031
|
-
{ name: "0011_conversation_owner.sql", sql: conversation_owner_default }
|
|
3034
|
+
{ name: "0011_conversation_owner.sql", sql: conversation_owner_default },
|
|
3035
|
+
{ name: "0012_conversation_peer_owner.sql", sql: conversation_peer_owner_default }
|
|
3032
3036
|
];
|
|
3033
3037
|
|
|
3034
3038
|
// sql-raw:/home/runner/work/a2a-exposed/a2a-exposed/control/migrations/0001_auth.sql
|