Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.2.0] - 2025-12-26

### Added

- **New /reset Command** - Clear all Convergio memory with a single command
- Clears semantic memory (knowledge graph and embeddings)
- Clears conversation notes and summaries
- Clears cached responses
- Clears database entries (plans, todos, sessions)
- Clears session history
- Provides confirmation prompt before destructive action

### Fixed

- **Response Truncation** - Doubled max_tokens defaults for all response styles
- Balanced style now uses 16384 tokens (was 8192)
- Detailed style now uses 32768 tokens (was 16384)
- Concise style now uses 8192 tokens (was 4096)
- Prevents premature response cutoff for complex queries

- **Workflow Registry** - Fixed agent lazy spawning
- Agents now spawn only when workflows are accessed
- Reduces startup time and memory usage
- Fixes registry initialization race condition

## [6.1.0] - 2025-12-26

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions Formula/convergio-biz.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class ConvergioBiz < Formula
desc "Convergio Business Edition - AI agents for sales, marketing & strategy"
homepage "https://github.com/Roberdan/convergio-cli"
version "6.1.0"
version "6.2.0"
license "MIT"

on_macos do
on_arm do
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.1.0/convergio-biz-6.1.0-arm64-apple-darwin.tar.gz"
sha256 "422280c854038b00e760bb3bcd00245de799a78bba1ebcc36c0dbc1171e9fe6b"
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.2.0/convergio-biz-6.2.0-arm64-apple-darwin.tar.gz"
sha256 "841948547c57b0a3165822950032ef525311686552847661c2adba35cbf4d9fc"
end
end

Expand Down
6 changes: 3 additions & 3 deletions Formula/convergio-dev.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class ConvergioDev < Formula
desc "Convergio Developer Edition - AI agents for code review, DevOps & security"
homepage "https://github.com/Roberdan/convergio-cli"
version "6.1.0"
version "6.2.0"
license "MIT"

on_macos do
on_arm do
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.1.0/convergio-dev-6.1.0-arm64-apple-darwin.tar.gz"
sha256 "c81d4adcf6e1db205e6fd2f5037b71d384d812d114fc6188db4ff56f7f6e6e3a"
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.2.0/convergio-dev-6.2.0-arm64-apple-darwin.tar.gz"
sha256 "1afc072232d6aa5a01e62cee6eedba559b4ddc857165fe93c70401da1ffedf71"
end
end

Expand Down
6 changes: 3 additions & 3 deletions Formula/convergio-edu.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class ConvergioEdu < Formula
desc "Convergio Education Edition - AI Maestri teachers for K-12 students"
homepage "https://github.com/Roberdan/convergio-cli"
version "6.1.0"
version "6.2.0"
license "MIT"

on_macos do
on_arm do
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.1.0/convergio-edu-6.1.0-arm64-apple-darwin.tar.gz"
sha256 "ece2047492036e0aa9a8f4642eb5c8a1ffc999efd383cf6e79037fd7ca5781c4"
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.2.0/convergio-edu-6.2.0-arm64-apple-darwin.tar.gz"
sha256 "fac2aa160dc9ec25b6d60159b1271616bbf394f65b4a9a501dd7cadc573db2ec"
end
end

Expand Down
6 changes: 3 additions & 3 deletions Formula/convergio.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class Convergio < Formula
desc "Multi-agent AI orchestration CLI for Apple Silicon"
homepage "https://github.com/Roberdan/convergio-cli"
version "6.1.0"
version "6.2.0"
license "MIT"

on_macos do
on_arm do
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.1.0/convergio-6.1.0-arm64-apple-darwin.tar.gz"
sha256 "8e63ddc39be98b15643dd9b149e591611add48748eed74712cff37997790350f"
url "https://github.com/Roberdan/convergio-cli/releases/download/v6.2.0/convergio-6.2.0-arm64-apple-darwin.tar.gz"
sha256 "9ce1b9fa7a0deccddc43957d5a1f433d91ce0a8f46a2a6eb9de855ac6bbe8ea1"
end
end

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.2.0
1 change: 1 addition & 0 deletions src/core/commands/command_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static const ReplCommand COMMANDS[] = {
// Session recall
{"recall", "View/load past sessions", cmd_recall},
// Semantic memory commands
{"reset", "Reset all Convergio memory (graph, notes, cache, etc.)", cmd_reset},
{"remember", "Store a memory", cmd_remember},
{"search", "Search memories semantically", cmd_search},
{"memories", "List recent/important memories", cmd_memories},
Expand Down
13 changes: 13 additions & 0 deletions src/core/commands/commands_help.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,19 @@ static const CommandHelp DETAILED_HELP[] = {
"quit\n"
"exit"},
// Semantic memory commands
{"reset", "reset", "Reset all Convergio memory",
"Permanently deletes ALL stored data including:\n"
" - Knowledge graph (all memories, nodes, and relations)\n"
" - Notes and documents\n"
" - Cache data\n"
" - Execution plans\n"
" - Session history\n"
" - Voice conversation history\n"
" - Education data (in Education edition)\n"
" - Generated outputs\n\n"
"REQUIRES CONFIRMATION: You must type 'RESET' (all caps) to proceed.\n"
"This action cannot be undone. Restart Convergio for full effect.",
"reset # Prompts for confirmation before deleting all data"},
{"remember", "remember <text>", "Store a memory in the knowledge graph",
"Creates a persistent memory node that survives across sessions.\n"
"Memories are stored with high importance (0.9) and can be:\n"
Expand Down
1 change: 1 addition & 0 deletions src/core/commands/commands_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ int cmd_project(int argc, char** argv);
int cmd_setup(int argc, char** argv);

// Memory commands (commands_memory.c)
int cmd_reset(int argc, char** argv);
int cmd_remember(int argc, char** argv);
int cmd_search(int argc, char** argv);
int cmd_memories(int argc, char** argv);
Expand Down
164 changes: 164 additions & 0 deletions src/core/commands/commands_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,170 @@ int cmd_graph(int argc, char** argv) {
return 0;
}

// ============================================================================
// MEMORY RESET COMMAND
// ============================================================================

/**
* /reset - Reset all Convergio memory (knowledge graph, notes, cache, databases)
*
* Clears:
* - Knowledge graph (semantic nodes and relations)
* - Notes directory
* - Cache directory
* - Plans database
* - Voice history database
* - Education database
* - Generated outputs
* - Session history
*/
int cmd_reset(int argc, char** argv) {
(void)argc;
(void)argv;

printf("\n\033[1;33m⚠️ CONVERGIO MEMORY RESET\033[0m\n\n");
printf("This will permanently delete:\n");
printf(" • All memories and knowledge graph data\n");
printf(" • All notes and documents\n");
printf(" • All cached data\n");
printf(" • All execution plans\n");
printf(" • All session history\n");
printf(" • All voice conversation history\n");
printf(" • All education data (if applicable)\n");
printf("\n\033[31mThis action cannot be undone!\033[0m\n\n");
printf("Are you sure you want to reset? Type 'RESET' to confirm: ");
fflush(stdout);

char confirm[32] = {0};
if (!fgets(confirm, sizeof(confirm), stdin)) {
printf("\nReset cancelled.\n");
return 0;
}

// Remove newline
confirm[strcspn(confirm, "\n")] = 0;

if (strcmp(confirm, "RESET") != 0) {
printf("\nReset cancelled. You must type 'RESET' exactly.\n");
return 0;
}

printf("\n\033[36mResetting Convergio...\033[0m\n\n");

// Get paths from config
extern const char* convergio_config_get(const char* key);
const char* db_path = convergio_config_get("db_path");
const char* notes_dir = convergio_config_get("notes_dir");
const char* knowledge_dir = convergio_config_get("knowledge_dir");
const char* cache_dir = convergio_config_get("cache_dir");
const char* config_dir = convergio_config_get("config_dir");

int errors = 0;
char cmd[1024];

// 1. Clear semantic database
if (db_path && db_path[0]) {
printf(" Clearing main database...\n");
if (remove(db_path) == 0) {
printf(" \033[32m✓\033[0m Removed %s\n", db_path);
} else if (errno != ENOENT) {
printf(" \033[33m!\033[0m Could not remove %s: %s\n", db_path, strerror(errno));
errors++;
Comment on lines +307 to +309
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code uses errno and strerror(errno) but doesn't include the necessary header file errno.h. This will cause a compilation error. Add #include <errno.h> to the includes section.

Copilot uses AI. Check for mistakes.
}
}

// 2. Clear notes directory
if (notes_dir && notes_dir[0]) {
printf(" Clearing notes...\n");
snprintf(cmd, sizeof(cmd), "rm -rf \"%s\"/* 2>/dev/null", notes_dir);
if (system(cmd) == 0) {
printf(" \033[32m✓\033[0m Cleared notes directory\n");
}
}

// 3. Clear knowledge directory
if (knowledge_dir && knowledge_dir[0]) {
printf(" Clearing knowledge base...\n");
snprintf(cmd, sizeof(cmd), "rm -rf \"%s\"/* 2>/dev/null", knowledge_dir);
if (system(cmd) == 0) {
printf(" \033[32m✓\033[0m Cleared knowledge directory\n");
}
}

// 4. Clear cache directory
if (cache_dir && cache_dir[0]) {
printf(" Clearing cache...\n");
snprintf(cmd, sizeof(cmd), "rm -rf \"%s\"/* 2>/dev/null", cache_dir);
if (system(cmd) == 0) {
printf(" \033[32m✓\033[0m Cleared cache directory\n");
}
}

// 5. Clear plans database
if (config_dir && config_dir[0]) {
char plans_db[512];
snprintf(plans_db, sizeof(plans_db), "%s/plans.db", config_dir);
printf(" Clearing execution plans...\n");
if (remove(plans_db) == 0) {
printf(" \033[32m✓\033[0m Removed plans database\n");
} else if (errno != ENOENT) {
printf(" \033[33m!\033[0m Could not remove plans.db: %s\n", strerror(errno));
}

// 6. Clear voice history
char voice_db[512];
snprintf(voice_db, sizeof(voice_db), "%s/voice_history.db", config_dir);
printf(" Clearing voice history...\n");
if (remove(voice_db) == 0) {
printf(" \033[32m✓\033[0m Removed voice history database\n");
} else if (errno != ENOENT) {
// Silently ignore - might not exist in all editions
}

// 7. Clear education database
char edu_db[512];
snprintf(edu_db, sizeof(edu_db), "%s/education.db", config_dir);
printf(" Clearing education data...\n");
if (remove(edu_db) == 0) {
printf(" \033[32m✓\033[0m Removed education database\n");
} else if (errno != ENOENT) {
// Silently ignore - might not exist in non-edu editions
}

// 8. Clear outputs directory
char outputs_dir[512];
snprintf(outputs_dir, sizeof(outputs_dir), "%s/outputs", config_dir);
printf(" Clearing generated outputs...\n");
snprintf(cmd, sizeof(cmd), "rm -rf \"%s\"/* 2>/dev/null", outputs_dir);
system(cmd);
printf(" \033[32m✓\033[0m Cleared outputs directory\n");

// 9. Clear session history
char sessions_dir[512];
snprintf(sessions_dir, sizeof(sessions_dir), "%s/sessions", config_dir);
printf(" Clearing session history...\n");
snprintf(cmd, sizeof(cmd), "rm -rf \"%s\"/* 2>/dev/null", sessions_dir);
system(cmd);
printf(" \033[32m✓\033[0m Cleared session history\n");
Comment on lines +316 to +385
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using system() with user-controlled paths (from config) without proper input validation poses a security risk. While the paths come from config files, they could potentially contain shell metacharacters that could lead to command injection. Consider using safer alternatives like directory traversal with opendir()/readdir()/unlink() or at minimum, validate and sanitize the paths to ensure they don't contain shell metacharacters before passing to system().

Copilot uses AI. Check for mistakes.
}

// Reset in-memory semantic graph
extern void nous_reset_fabric(void);
printf(" Resetting in-memory graph...\n");
nous_reset_fabric();
printf(" \033[32m✓\033[0m In-memory graph cleared\n");

printf("\n");
if (errors == 0) {
printf("\033[32m✓ Convergio memory has been reset.\033[0m\n");
printf("\n\033[90mNote: Restart Convergio for changes to take full effect.\033[0m\n");
} else {
printf("\033[33m⚠ Reset completed with %d warning(s).\033[0m\n", errors);
}

return 0;
}

// ============================================================================
// GIT/TEST WORKFLOW COMMANDS (Issue #15)
// ============================================================================
Expand Down
Loading
Loading