feat: overhaul hp_agent lifecycle handling

* Added backoff and liveness probes for better management
* Switched IPC to a simple text based system
* Lookups don't directly touch the agent now
* Use the database as a source of truth
This commit is contained in:
Aarnav Tale
2025-08-19 00:10:06 -04:00
parent a4a037ed68
commit 8cb91cd45b
12 changed files with 619 additions and 512 deletions
+5
View File
@@ -0,0 +1,5 @@
CREATE TABLE `host_info` (
`host_id` text PRIMARY KEY NOT NULL,
`payload` text,
`updated_at` integer
);
+73
View File
@@ -0,0 +1,73 @@
{
"version": "6",
"dialect": "sqlite",
"id": "16f780a3-a6e7-4810-94bb-fad5c6446ab4",
"prevId": "ab03ffcd-9aa5-4b4b-9f38-322acc6899a3",
"tables": {
"ephemeral_nodes": {
"name": "ephemeral_nodes",
"columns": {
"auth_key": {
"name": "auth_key",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"node_key": {
"name": "node_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"host_info": {
"name": "host_info",
"columns": {
"host_id": {
"name": "host_id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"payload": {
"name": "payload",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}
+7
View File
@@ -8,6 +8,13 @@
"when": 1750355487927,
"tag": "0000_spicy_bloodscream",
"breakpoints": true
},
{
"idx": 1,
"version": "6",
"when": 1755554742267,
"tag": "0001_naive_lilith",
"breakpoints": true
}
]
}