v0.2.44 - Fix adoption list selection to self-authored latest event in agent and skill tool

This commit is contained in:
Didactyl User
2026-04-16 17:25:47 -04:00
parent b5b479e9a8
commit c877ca646e
4 changed files with 17 additions and 4 deletions

View File

@@ -54,11 +54,11 @@ Skills compose by adoption-list order (`10123`) and trigger tags carry runtime e
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.2.43
## Current Status — v0.2.44
**Active build — this project is barely working. Experiment at your own risk.**
> Last release update: v0.2.43 — Fix /help adopted-skills section to use latest kind 10123 event by created_at in CLI and HTTP views
> Last release update: v0.2.44 — Fix adoption list selection to self-authored latest event in agent and skill tool
- 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

@@ -1471,6 +1471,13 @@ static int refresh_adopted_skills_cache_if_needed(void) {
if (!ev || !cJSON_IsObject(ev)) {
continue;
}
cJSON* ev_pubkey = cJSON_GetObjectItemCaseSensitive(ev, "pubkey");
if (!ev_pubkey || !cJSON_IsString(ev_pubkey) || !ev_pubkey->valuestring ||
strcmp(ev_pubkey->valuestring, g_cfg->keys.public_key_hex) != 0) {
continue;
}
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
if (!list_event || created > list_event_created_at) {

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 2
#define DIDACTYL_VERSION_PATCH 43
#define DIDACTYL_VERSION "v0.2.43"
#define DIDACTYL_VERSION_PATCH 44
#define DIDACTYL_VERSION "v0.2.44"
// Agent metadata
#define DIDACTYL_NAME "Didactyl"

View File

@@ -342,6 +342,12 @@ static int fetch_adoption_list_tags_local(tools_context_t* ctx, cJSON** out_tags
continue;
}
cJSON* ev_pubkey = cJSON_GetObjectItemCaseSensitive(ev, "pubkey");
if (!ev_pubkey || !cJSON_IsString(ev_pubkey) || !ev_pubkey->valuestring ||
strcmp(ev_pubkey->valuestring, ctx->cfg->keys.public_key_hex) != 0) {
continue;
}
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
if (!best || created > best_created) {