#ifndef DIDACTYL_TOOLS_INTERNAL_H
#define DIDACTYL_TOOLS_INTERNAL_H

#include "tools.h"

int tools_init_legacy(tools_context_t* ctx, didactyl_config_t* cfg);
void tools_cleanup_legacy(tools_context_t* ctx);
char* tools_build_openai_schema_json_legacy(const tools_context_t* ctx);
char* tools_execute_legacy(tools_context_t* ctx, const char* tool_name, const char* args_json);

char* execute_tool_list(tools_context_t* ctx, const char* args_json);
char* execute_trigger_list(tools_context_t* ctx, const char* args_json);
char* execute_message_current(tools_context_t* ctx, const char* args_json);
char* execute_agent_identity(tools_context_t* ctx, const char* args_json);
char* execute_agent_version(const char* args_json);
char* execute_nostr_agent_profile(tools_context_t* ctx, const char* args_json);
char* execute_nostr_agent_contacts(tools_context_t* ctx, const char* args_json);
char* execute_nostr_agent_relays(tools_context_t* ctx, const char* args_json);
char* execute_nostr_agent_notes(tools_context_t* ctx, const char* args_json);
char* execute_model_get(const char* args_json);
char* execute_model_set(tools_context_t* ctx, const char* args_json);
char* execute_model_list(const char* args_json);
char* execute_nostr_query(const char* args_json);
char* execute_nostr_my_events(tools_context_t* ctx, const char* args_json);
char* execute_nostr_pubkey(tools_context_t* ctx, const char* args_json);
char* execute_nostr_npub(tools_context_t* ctx, const char* args_json);
char* execute_nostr_encode(const char* args_json);
char* execute_nostr_decode(const char* args_json);
char* execute_nostr_react(const char* args_json);
char* execute_nostr_profile_get(const char* args_json);
char* execute_nostr_nip05_lookup(const char* args_json);
char* execute_nostr_relay_status(const char* args_json);
char* execute_nostr_relay_info(const char* args_json);
char* execute_nostr_subscription_status(const char* args_json);
char* execute_nostr_subscription_set(const char* args_json);
char* execute_nostr_dm_send(const char* args_json);
char* execute_nostr_encrypt(tools_context_t* ctx, const char* args_json);
char* execute_nostr_decrypt(tools_context_t* ctx, const char* args_json);
char* execute_nostr_dm_send_nip17(const char* args_json);
char* execute_nostr_delete(const char* args_json);
char* execute_nostr_list_manage(tools_context_t* ctx, const char* args_json);
char* execute_nostr_block_list(tools_context_t* ctx, const char* args_json);
char* execute_nostr_block_edit(tools_context_t* ctx, const char* args_json);
char* execute_admin_identity(tools_context_t* ctx, const char* args_json);
char* execute_nostr_admin_profile(tools_context_t* ctx, const char* args_json);
char* execute_nostr_admin_contacts(tools_context_t* ctx, const char* args_json);
char* execute_nostr_admin_relays(tools_context_t* ctx, const char* args_json);
char* execute_nostr_admin_notes(tools_context_t* ctx, const char* args_json);
char* execute_task_list(tools_context_t* ctx, const char* args_json);
char* execute_task_manage(tools_context_t* ctx, const char* args_json);
char* execute_local_http_fetch(tools_context_t* ctx, const char* args_json);
char* execute_local_shell_exec(tools_context_t* ctx, const char* args_json);
char* execute_local_file_read(tools_context_t* ctx, const char* args_json);
char* execute_local_file_write(tools_context_t* ctx, const char* args_json);
char* execute_nostr_post(const char* args_json);
char* execute_nostr_post_readme(tools_context_t* ctx, const char* args_json);
char* execute_nostr_file_md_to_longform_post(tools_context_t* ctx, const char* args_json);
char* execute_skill_create(tools_context_t* ctx, const char* args_json);
char* execute_skill_list(tools_context_t* ctx, const char* args_json);
char* execute_skill_get(tools_context_t* ctx, const char* args_json);
char* execute_skill_view(tools_context_t* ctx, const char* args_json);
char* execute_skill_set(tools_context_t* ctx, const char* args_json);
char* execute_skill_adopt(tools_context_t* ctx, const char* args_json);
char* execute_skill_remove(tools_context_t* ctx, const char* args_json);
char* execute_skill_edit(tools_context_t* ctx, const char* args_json);
char* execute_skill_search(const char* args_json);

char* execute_memory_save(tools_context_t* ctx, const char* args_json);
char* execute_memory_recall(tools_context_t* ctx, const char* args_json);
char* execute_my_memory(tools_context_t* ctx, const char* args_json);
char* execute_memory_short_term_read(tools_context_t* ctx, const char* args_json);
char* execute_config_store(tools_context_t* ctx, const char* args_json);
char* execute_config_recall(tools_context_t* ctx, const char* args_json);
char* execute_adopted_skills(tools_context_t* ctx, const char* args_json);
char* execute_trigger_event(tools_context_t* ctx, const char* args_json);
char* execute_nostr_dm_history(tools_context_t* ctx, const char* args_json);

char* execute_cashu_wallet_balance(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_info(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_mint_quote(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_mint_check(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_mint_claim(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_melt_quote(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_melt_pay(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_check_proofs(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_receive_token(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_send_token(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_mints_get(tools_context_t* ctx, const char* args_json);
char* execute_cashu_wallet_mints_set(tools_context_t* ctx, const char* args_json);

char* execute_blossom_upload(tools_context_t* ctx, const char* args_json);
char* execute_blossom_download(tools_context_t* ctx, const char* args_json);
char* execute_blossom_head(tools_context_t* ctx, const char* args_json);
char* execute_blossom_delete(tools_context_t* ctx, const char* args_json);
char* execute_blossom_list(tools_context_t* ctx, const char* args_json);

int memory_init(tools_context_t* ctx);
void memory_cleanup(void);

#endif
