Conversation
- Create storage types module (Session, Message, ToolCall) - Define AgentStorage trait with async storage operations - Create StorageError enum with thiserror - Refactor codebase_analysis agent to use AgentStorage trait - Refactor sqlite_reader agent to use AgentStorage trait - Refactor requirements_gathering agent with separate RequirementsStorage trait - Create InMemoryStorage implementation for testing - Add thiserror and uuid dependencies - Update lib.rs to export storage and types modules - Make agents generic over storage type - Add progress tracking documentation This allows consuming applications to provide custom storage implementations (PostgreSQL, files, etc.) instead of being tied to SQLite. Ref: refactor-storage-to-trait-based-interface.md
Complete the storage abstraction refactoring by updating all remaining agents to use the AgentStorage trait instead of concrete Database implementation. Changes: - Refactored SettingsManagementAgent to use AgentStorage trait - Refactored StructuredJsonAgent to use AgentStorage trait - Refactored TesseractAgent to use AgentStorage trait - Refactored ImapEmailAgent to use AgentStorage trait - Updated factory.rs to accept storage parameters and use InMemoryStorage - Removed rusqlite and refinery dependencies from Cargo.toml - Removed database module export from lib.rs - Implemented RequirementsStorage trait for InMemoryStorage - Made requirements_gathering storage module public All agents now use async trait-based storage, enabling consumers to implement their own storage backends (PostgreSQL, files, memory, etc.) without coupling to SQLite. Related to previous commit: refactor trait-based storage abstraction Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Refactor PdfToTextAgent to use AgentStorage trait (like TesseractAgent) - Remove old database extension modules (requirements_gathering/database.rs, settings_management/database.rs) - Update all 6 binary runners to use InMemoryStorage - Add RequirementsStorage bound to AgentFactory for UserClarificationAgent - Fix borrow issues in InMemoryStorage (clone session_id before use) All agents now use the storage trait abstraction instead of direct Database. Binary runners use in-memory storage with proper session creation via Session struct.
…rmance Completes the storage refactoring by switching all identifier types from String to i64 across both nocodo-agents library and nocodo-api application. This change eliminates runtime string parsing overhead and improves type safety. Changes in nocodo-agents: - Update AgentStorage trait to use i64 for all ID types - Update Session, Message, ToolCall types to use i64 for IDs - Update RequirementsStorage trait to use i64 - Replace UUID-based InMemoryStorage with atomic i64 counter - Update all 8 agent implementations to use i64 internally - Update all 6 binary runners to use i64 directly Changes in nocodo-api: - Implement SqliteAgentStorage with i64 native support - Add storage module with migrations - Update all 8 agent execution handlers to use i64 - Update sessions and requirements handling for i64 - Fix DirectRequirementsStorage implementation - Remove 150+ string conversion calls across codebase Benefits: - Zero runtime parsing overhead - Type-safe ID handling throughout - Simpler, cleaner code - Direct SQLite INTEGER ↔ i64 mapping Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add optional "sqlite" feature flag to both nocodo-tools and nocodo-agents to resolve rusqlite conflicts when integrating with PostgreSQL projects. Changes: - Make rusqlite and sqlparser optional dependencies in nocodo-tools - Add sqlite feature flag that conditionally compiles sqlite_reader and hackernews modules - Make SqliteReaderAgent and related code conditional on sqlite feature in nocodo-agents - Require sqlite feature for sqlite-reader-runner binary - Update tool schemas and executor to handle conditional sqlite support By default, neither crate pulls in rusqlite. Enable with features = ["sqlite"]. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
📊 Code Complexity Analysis
💡 Suggestion: This is a large PR with 4340 added lines. Consider:
Automated analysis by GitHub Actions |
🤖 Automated Code Review SummaryThis automated review was generated to help ensure code quality and security standards. Rust Code Analysis
Security Analysis
Recommendations
This review was automatically generated. Please address any issues before merging. |
Deploying nocodo with
|
| Latest commit: |
f0b1666
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://70e3557f.nocodo.pages.dev |
| Branch Preview URL: | https://chore-refactor-storage.nocodo.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.