33 lines
1.3 KiB
C
33 lines
1.3 KiB
C
#ifndef OPEN_WING_AGENT_H
|
|
#define OPEN_WING_AGENT_H
|
|
|
|
#include "config.h"
|
|
#include "nostr_handler.h"
|
|
#include "cjson/cJSON.h"
|
|
#include "tools/tools.h"
|
|
|
|
struct trigger_manager;
|
|
|
|
int agent_init(didactyl_config_t* config);
|
|
/* Wire a process-lifetime signer handle (non-owning) into the agent's tools
|
|
* context so NIP-04/44 encrypt/decrypt tool call sites route through the
|
|
* signer. Must be called after agent_init. Caller retains ownership. */
|
|
void agent_set_signer(nostr_signer_t* signer);
|
|
void agent_set_trigger_manager(struct trigger_manager* trigger_manager);
|
|
void agent_on_trigger(const char* skill_d_tag,
|
|
const char* skill_content,
|
|
cJSON* triggering_event,
|
|
const char* relay_url);
|
|
void agent_on_message(const char* sender_pubkey_hex,
|
|
const char* message,
|
|
didactyl_sender_tier_t tier,
|
|
void* user_data);
|
|
int agent_build_admin_messages_json(const char* current_user_message,
|
|
didactyl_sender_tier_t sender_tier,
|
|
char** out_messages_json);
|
|
tools_context_t* agent_tools_context(void);
|
|
const char* agent_classify_message_part(cJSON* msg, int idx);
|
|
void agent_invalidate_adopted_skills_cache(void);
|
|
void agent_cleanup(void);
|
|
|
|
#endif |