Compare commits

...
2 Commits
5 changed files with 19 additions and 9 deletions
+2 -2
View File
@@ -55,11 +55,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.0.85
## Current Status — v0.0.87
**Active build — this project is barely working. Experiment at your own risk.**
> Last release update: v0.0.85Skip llm_config republish on startup when config was recalled from Nostr
> Last release update: v0.0.87Fix config_store d_tag use-after-free causing llm_config replacement failures
- Connects to configured relays with auto-reconnect and relay state transition logging
- Publishes configured startup events per relay as each relay becomes connected
+5 -2
View File
@@ -741,8 +741,11 @@ static int handle_slash_command(const char* sender_pubkey_hex, const char* messa
result_json = strdup("{\"success\":false,\"error\":\"direct tool execution failed\"}");
}
char* markdown_result = format_result_markdown_local(result_json);
const char* dm_payload = markdown_result ? markdown_result : result_json;
size_t tool_name_len = strlen(tool_name);
int send_raw_json = (tool_name_len >= 4U && strcmp(tool_name + tool_name_len - 4U, "_get") == 0);
char* markdown_result = send_raw_json ? NULL : format_result_markdown_local(result_json);
const char* dm_payload = send_raw_json ? result_json : (markdown_result ? markdown_result : result_json);
size_t log_cap = strlen(message) + strlen(result_json ? result_json : "") + strlen(dm_payload ? dm_payload : "") + 192U;
char* log_payload = (char*)malloc(log_cap);
+2 -2
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 85
#define DIDACTYL_VERSION "v0.0.85"
#define DIDACTYL_VERSION_PATCH 87
#define DIDACTYL_VERSION "v0.0.87"
// Agent metadata
#define DIDACTYL_NAME "Didactyl"
+5 -2
View File
@@ -143,6 +143,9 @@ char* execute_config_store(tools_context_t* ctx, const char* args_json) {
return json_error_local("config_store requires content");
}
char d_tag_buf[128];
snprintf(d_tag_buf, sizeof(d_tag_buf), "%s", d_tag_j->valuestring);
char* content_text = NULL;
if (cJSON_IsString(content_j) && content_j->valuestring) {
content_text = strdup(content_j->valuestring);
@@ -180,7 +183,7 @@ char* execute_config_store(tools_context_t* ctx, const char* args_json) {
}
cJSON_AddItemToArray(d_tag, cJSON_CreateString("d"));
cJSON_AddItemToArray(d_tag, cJSON_CreateString(d_tag_j->valuestring));
cJSON_AddItemToArray(d_tag, cJSON_CreateString(d_tag_buf));
cJSON_AddItemToArray(tags, d_tag);
cJSON_AddItemToArray(app_tag, cJSON_CreateString("app"));
@@ -208,7 +211,7 @@ char* execute_config_store(tools_context_t* ctx, const char* args_json) {
}
cJSON_AddBoolToObject(out, "success", 1);
cJSON_AddStringToObject(out, "d_tag", d_tag_j->valuestring);
cJSON_AddStringToObject(out, "d_tag", d_tag_buf);
cJSON_AddNumberToObject(out, "kind", CONFIG_KIND);
cJSON_AddNumberToObject(out, "content_length", (double)strlen(content_text));
cJSON_AddStringToObject(out, "event_id", publish_result.event_id);
+5 -1
View File
@@ -147,7 +147,7 @@ char* execute_model_get(const char* args_json) {
cJSON_AddStringToObject(out, "provider", cfg.provider);
cJSON_AddStringToObject(out, "model", cfg.model);
cJSON_AddStringToObject(out, "base_url", cfg.base_url);
cJSON_AddStringToObject(out, "api_key_masked", api_key_masked);
cJSON_AddStringToObject(out, "api_key", api_key_masked);
cJSON_AddNumberToObject(out, "max_tokens", cfg.max_tokens);
cJSON_AddNumberToObject(out, "temperature", cfg.temperature);
@@ -220,10 +220,14 @@ char* execute_model_set(tools_context_t* ctx, const char* args_json) {
cJSON* out = cJSON_CreateObject();
if (!out) return NULL;
char api_key_masked[64] = {0};
mask_api_key_local(cfg.api_key, api_key_masked, sizeof(api_key_masked));
cJSON_AddBoolToObject(out, "success", 1);
cJSON_AddStringToObject(out, "provider", cfg.provider);
cJSON_AddStringToObject(out, "model", cfg.model);
cJSON_AddStringToObject(out, "base_url", cfg.base_url);
cJSON_AddStringToObject(out, "api_key", api_key_masked);
cJSON_AddNumberToObject(out, "max_tokens", cfg.max_tokens);
cJSON_AddNumberToObject(out, "temperature", cfg.temperature);
cJSON_AddBoolToObject(out, "persisted", persisted ? 1 : 0);