v0.0.41 - Fix startup relay-state log snapshot before main loop

This commit is contained in:
Your Name
2026-03-05 15:30:32 -04:00
parent ad99f74bc0
commit 31439652aa
5 changed files with 17 additions and 4 deletions

View File

@@ -51,11 +51,11 @@ Agents learn capabilities through skills — Nostr events that any agent can di
Didactyl will support local inference, which is very privacy preserving. Remote inference does however have it's advantages, and in those cases Didactyl supports using Bitcoin Lightning and eCash inference providers.
## Current Status — v0.0.40
## Current Status — v0.0.41
**Active build — this project is barely working. Experiment at your own risk.**
> Last release update: v0.0.40Reduce query churn and add relay disconnect-cause visibility
> Last release update: v0.0.41Fix startup relay-state log snapshot before main loop
- Connects to configured relays with auto-reconnect and relay state transition logging
- Publishes configured startup events per relay as each relay becomes connected

View File

@@ -318,6 +318,8 @@ int main(int argc, char** argv) {
DEBUG_INFO("[didactyl] HTTP API disabled (set api.enabled=true in config to enable)");
}
nostr_handler_refresh_relay_statuses();
DEBUG_INFO("[didactyl] entering main poll loop");
DEBUG_INFO("[didactyl] running with pubkey %s", cfg.keys.public_key_hex);

View File

@@ -12,8 +12,8 @@
// Using DIDACTYL_ prefix to avoid conflicts with nostr_core_lib VERSION macros
#define DIDACTYL_VERSION_MAJOR 0
#define DIDACTYL_VERSION_MINOR 0
#define DIDACTYL_VERSION_PATCH 40
#define DIDACTYL_VERSION "v0.0.40"
#define DIDACTYL_VERSION_PATCH 41
#define DIDACTYL_VERSION "v0.0.41"
// Agent metadata
#define DIDACTYL_NAME "Didactyl"

View File

@@ -240,6 +240,16 @@ static void log_relay_state_changes(void) {
}
}
void nostr_handler_refresh_relay_statuses(void) {
if (!g_pool || !g_cfg || !g_last_relay_statuses) {
return;
}
for (int i = 0; i < g_cfg->relay_count; i++) {
g_last_relay_statuses[i] = nostr_relay_pool_get_relay_status(g_pool, g_cfg->relays[i]);
}
}
static void log_publish_targets(const char* action) {
if (!g_cfg) {
return;

View File

@@ -37,6 +37,7 @@ void nostr_handler_publish_result_free(nostr_publish_result_t* result);
char* nostr_handler_query_json(cJSON* filter, int timeout_ms);
int nostr_handler_poll(int timeout_ms);
int nostr_handler_reconcile_startup_events(void);
void nostr_handler_refresh_relay_statuses(void);
const char* nostr_handler_get_system_context(void);
const char* nostr_handler_get_startup_display_name(void);
int nostr_handler_connected_relay_count(void);