74 const char* project_path,
75 const char* model_id);
88 const char* conversation_id,
89 const char* messages_json);
103 const char* conversation_id,
150 const char* conversation_id);
170 const char* parent_conversation_id,
171 const char* delegating_tier,
172 const char* target_tier,
189 const char* delegation_id,
191 const char* result_summary);
205 const char* conversation_id,
221 const char* conversation_id,
222 const char* messages_json);
Error types for cross-.so error reporting.
entropic_error_t
Error codes returned by all C API functions.
ENTROPIC_EXPORT entropic_storage_backend_t entropic_storage_create(const char *db_path)
Create a storage backend with SQLite at the given path.
ENTROPIC_EXPORT entropic_error_t entropic_storage_get_stats(entropic_storage_backend_t storage, char **result_json)
Get storage statistics.
ENTROPIC_EXPORT void entropic_storage_destroy(entropic_storage_backend_t storage)
Destroy storage and close connections.
ENTROPIC_EXPORT entropic_error_t entropic_storage_save_conversation(entropic_storage_backend_t storage, const char *conversation_id, const char *messages_json)
Save messages to a conversation.
ENTROPIC_EXPORT entropic_error_t entropic_storage_load_conversation(entropic_storage_backend_t storage, const char *conversation_id, char **result_json)
Load a conversation with messages.
ENTROPIC_EXPORT entropic_error_t entropic_storage_initialize(entropic_storage_backend_t storage)
Initialize storage (run migrations, create tables).
struct entropic_storage_backend * entropic_storage_backend_t
Opaque handle to a storage backend instance.
ENTROPIC_EXPORT entropic_error_t entropic_storage_list_conversations(entropic_storage_backend_t storage, int limit, int offset, char **result_json)
List conversations with pagination.
ENTROPIC_EXPORT entropic_error_t entropic_storage_delete_conversation(entropic_storage_backend_t storage, const char *conversation_id)
Delete a conversation and all associated records.
ENTROPIC_EXPORT entropic_error_t entropic_storage_create_delegation(entropic_storage_backend_t storage, const char *parent_conversation_id, const char *delegating_tier, const char *target_tier, const char *task, int max_turns, char **result_json)
Create a delegation record with a child conversation.
ENTROPIC_EXPORT entropic_error_t entropic_storage_save_snapshot(entropic_storage_backend_t storage, const char *conversation_id, const char *messages_json)
Save a pre-compaction snapshot of full conversation history.
ENTROPIC_EXPORT entropic_error_t entropic_storage_complete_delegation(entropic_storage_backend_t storage, const char *delegation_id, const char *status, const char *result_summary)
Mark a delegation as completed or failed.
ENTROPIC_EXPORT entropic_error_t entropic_storage_get_delegations(entropic_storage_backend_t storage, const char *conversation_id, char **result_json)
Get delegations for a parent conversation.
ENTROPIC_EXPORT char * entropic_storage_create_conversation(entropic_storage_backend_t storage, const char *title, const char *project_path, const char *model_id)
Create a new conversation.
ENTROPIC_EXPORT entropic_error_t entropic_storage_search_conversations(entropic_storage_backend_t storage, const char *query, int limit, char **result_json)
Full-text search across conversations.