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
62 changes: 31 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[workspace]
resolver = "2"
members = [
"shared-types",
"manager-tools",
"nocodo-llm-sdk", "nocodo-agents",
"nocodo-api",
]
members = [
"shared-types",
"nocodo-tools",
"nocodo-llm-sdk", "nocodo-agents",
"nocodo-api",
]
# nocodo-github-actions temporarily removed from workspace due to missing directory
exclude = [
"manager-web"
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository.workspace = true
[dependencies]
nocodo-llm-sdk = { path = "../nocodo-llm-sdk", features = ["ffi"] }
shared-types = { path = "../shared-types" }
manager-tools = { path = "../manager-tools" }
nocodo-tools = { path = "../nocodo-tools" }
anyhow = { workspace = true }
async-trait = "0.1"
tokio = { version = "1.0", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/bin/codebase_analysis_runner.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::Parser;
use manager_tools::ToolExecutor;
use nocodo_agents::{config, factory::create_codebase_analysis_agent, Agent};
use nocodo_llm_sdk::glm::zai::ZaiGlmClient;
use nocodo_tools::ToolExecutor;
use std::path::PathBuf;
use std::sync::Arc;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/bin/sqlite_analysis_runner.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::Parser;
use manager_tools::ToolExecutor;
use nocodo_agents::{config, factory::create_sqlite_analysis_agent, Agent};
use nocodo_llm_sdk::glm::zai::ZaiGlmClient;
use nocodo_tools::ToolExecutor;
use std::path::PathBuf;
use std::sync::Arc;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/bin/structured_json_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async fn main() -> anyhow::Result<()> {
let database = Arc::new(nocodo_agents::database::Database::new(&db_path)?);

let tool_executor = Arc::new(
manager_tools::ToolExecutor::new(std::env::current_dir()?)
nocodo_tools::ToolExecutor::new(std::env::current_dir()?)
.with_max_file_size(10 * 1024 * 1024),
);

Expand Down
4 changes: 2 additions & 2 deletions nocodo-agents/src/codebase_analysis/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::{database::Database, Agent, AgentTool};
use anyhow;
use async_trait::async_trait;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::client::LlmClient;
use nocodo_llm_sdk::tools::ToolCall;
use nocodo_llm_sdk::tools::ToolChoice;
use nocodo_llm_sdk::types::{CompletionRequest, ContentBlock, Message, Role};
use nocodo_tools::ToolExecutor;
use std::sync::Arc;
use std::time::Instant;

Expand Down Expand Up @@ -173,7 +173,7 @@ impl CodebaseAnalysisAgent {

// 3. Execute tool with typed request ✅
let start = Instant::now();
let result: anyhow::Result<manager_tools::types::ToolResponse> = self
let result: anyhow::Result<nocodo_tools::types::ToolResponse> = self
.tool_executor
.execute(tool_request) // ✅ Typed execution
.await;
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/src/codebase_analysis/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl LlmClient for MockLlmClient {

fn create_test_agent() -> CodebaseAnalysisAgent {
use crate::database::Database;
use manager_tools::ToolExecutor;
use nocodo_tools::ToolExecutor;
use std::path::PathBuf;

let client: Arc<dyn LlmClient> = Arc::new(MockLlmClient);
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::sqlite_analysis::SqliteAnalysisAgent;
use crate::structured_json::StructuredJsonAgent;
use crate::tesseract::TesseractAgent;
use crate::Agent;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::client::LlmClient;
use nocodo_tools::ToolExecutor;
use std::sync::Arc;

/// Enum representing the available agent types
Expand Down
14 changes: 7 additions & 7 deletions nocodo-agents/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pub mod tesseract;
pub mod tools;

use async_trait::async_trait;
use manager_tools::types::filesystem::*;
use manager_tools::types::{ToolRequest, ToolResponse};
use nocodo_tools::types::filesystem::*;
use nocodo_tools::types::{ToolRequest, ToolResponse};
use serde::{Deserialize, Serialize};
use shared_types::user_interaction::*;

Expand Down Expand Up @@ -68,15 +68,15 @@ impl AgentTool {
ToolRequest::WriteFile(req)
}
"grep" => {
let req: manager_tools::types::GrepRequest = serde_json::from_value(arguments)?;
let req: nocodo_tools::types::GrepRequest = serde_json::from_value(arguments)?;
ToolRequest::Grep(req)
}
"apply_patch" => {
let req: ApplyPatchRequest = serde_json::from_value(arguments)?;
ToolRequest::ApplyPatch(req)
}
"bash" => {
let req: manager_tools::types::BashRequest = serde_json::from_value(arguments)?;
let req: nocodo_tools::types::BashRequest = serde_json::from_value(arguments)?;
ToolRequest::Bash(req)
}
"ask_user" => {
Expand All @@ -97,9 +97,9 @@ impl AgentTool {
.and_then(|v| v.as_u64())
.map(|v| v as usize);

ToolRequest::Sqlite3Reader(manager_tools::types::Sqlite3ReaderRequest {
ToolRequest::Sqlite3Reader(nocodo_tools::types::Sqlite3ReaderRequest {
db_path: String::new(),
mode: manager_tools::types::SqliteMode::Query { query },
mode: nocodo_tools::types::SqliteMode::Query { query },
limit,
})
}
Expand All @@ -111,7 +111,7 @@ impl AgentTool {
}

/// Format ToolResponse for display to LLM
pub fn format_tool_response(response: &manager_tools::types::ToolResponse) -> String {
pub fn format_tool_response(response: &nocodo_tools::types::ToolResponse) -> String {
match response {
ToolResponse::ListFiles(r) => format!("Found {} files:\n{}", r.files.len(), r.files),
ToolResponse::ReadFile(r) => {
Expand Down
6 changes: 3 additions & 3 deletions nocodo-agents/src/requirements_gathering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ mod migrations_test;
use crate::{database::Database, Agent, AgentTool};
use anyhow;
use async_trait::async_trait;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::client::LlmClient;
use nocodo_llm_sdk::tools::{ToolCall, ToolChoice};
use nocodo_llm_sdk::types::{CompletionRequest, ContentBlock, Message, Role};
use nocodo_tools::ToolExecutor;
use std::sync::Arc;
use std::time::Instant;

Expand Down Expand Up @@ -93,7 +93,7 @@ that you need more information about what they want to automate."#.to_string()
)?;

let start = Instant::now();
let result: anyhow::Result<manager_tools::types::ToolResponse> =
let result: anyhow::Result<nocodo_tools::types::ToolResponse> =
self.tool_executor.execute(tool_request).await;
let execution_time = start.elapsed().as_millis() as i64;

Expand Down Expand Up @@ -331,7 +331,7 @@ pub fn create_user_clarification_agent(
client: Arc<dyn LlmClient>,
) -> anyhow::Result<(UserClarificationAgent, Arc<Database>)> {
let database = Arc::new(Database::new(&std::path::PathBuf::from(":memory:"))?);
let tool_executor = Arc::new(manager_tools::ToolExecutor::new(std::path::PathBuf::from(
let tool_executor = Arc::new(nocodo_tools::ToolExecutor::new(std::path::PathBuf::from(
".",
)));
let agent = UserClarificationAgent::new(client, database.clone(), tool_executor);
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/src/requirements_gathering/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn setup_test_agent(
});

let database = Arc::new(Database::new(&PathBuf::from(":memory:"))?);
let tool_executor = Arc::new(manager_tools::ToolExecutor::new(PathBuf::from(".")));
let tool_executor = Arc::new(nocodo_tools::ToolExecutor::new(PathBuf::from(".")));
let agent = UserClarificationAgent::new(client, database.clone(), tool_executor);

Ok((agent, database))
Expand Down
8 changes: 4 additions & 4 deletions nocodo-agents/src/settings_management/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pub mod models;
use crate::{database::Database, Agent, AgentTool};
use anyhow;
use async_trait::async_trait;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::client::LlmClient;
use nocodo_llm_sdk::tools::{ToolCall, ToolChoice};
use nocodo_llm_sdk::types::{CompletionRequest, ContentBlock, Message, Role};
use nocodo_tools::ToolExecutor;
use std::sync::Arc;
use std::time::Instant;

Expand Down Expand Up @@ -149,7 +149,7 @@ using the tool."#,
)?;

let start = Instant::now();
let result: anyhow::Result<manager_tools::types::ToolResponse> =
let result: anyhow::Result<nocodo_tools::types::ToolResponse> =
self.tool_executor.execute(tool_request).await;
let execution_time = start.elapsed().as_millis() as i64;

Expand Down Expand Up @@ -370,7 +370,7 @@ impl Agent for SettingsManagementAgent {
let execution_time = start.elapsed().as_millis() as i64;

// Extract responses from tool_response
if let manager_tools::types::ToolResponse::AskUser(ask_user_response) =
if let nocodo_tools::types::ToolResponse::AskUser(ask_user_response) =
&tool_response
{
// Group responses by section name (parsed from question IDs like "section.key")
Expand Down Expand Up @@ -457,7 +457,7 @@ pub fn create_settings_management_agent(
agent_schemas: Vec<crate::AgentSettingsSchema>,
) -> anyhow::Result<(SettingsManagementAgent, Arc<Database>)> {
let database = Arc::new(Database::new(&std::path::PathBuf::from(":memory:"))?);
let tool_executor = Arc::new(manager_tools::ToolExecutor::new(std::path::PathBuf::from(
let tool_executor = Arc::new(nocodo_tools::ToolExecutor::new(std::path::PathBuf::from(
".",
)));
let agent = SettingsManagementAgent::new(
Expand Down
8 changes: 4 additions & 4 deletions nocodo-agents/src/sqlite_analysis/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::{database::Database, Agent, AgentTool};
use anyhow::{self};
use async_trait::async_trait;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::client::LlmClient;
use nocodo_llm_sdk::tools::{ToolCall, ToolChoice};
use nocodo_llm_sdk::types::{CompletionRequest, ContentBlock, Message, Role};
use nocodo_tools::ToolExecutor;
use std::path::Path;
use std::sync::Arc;
use std::time::Instant;
Expand All @@ -29,7 +29,7 @@ impl SqliteAnalysisAgent {
) -> anyhow::Result<Self> {
validate_db_path(&db_path)?;

let table_names = manager_tools::sqlite_analysis::get_table_names(&db_path).await?;
let table_names = nocodo_tools::sqlite_analysis::get_table_names(&db_path).await?;

let db_name = std::path::Path::new(&db_path)
.file_stem()
Expand Down Expand Up @@ -110,7 +110,7 @@ impl SqliteAnalysisAgent {
let mut tool_request =
AgentTool::parse_tool_call(tool_call.name(), tool_call.arguments().clone())?;

if let manager_tools::types::ToolRequest::Sqlite3Reader(ref mut req) = tool_request {
if let nocodo_tools::types::ToolRequest::Sqlite3Reader(ref mut req) = tool_request {
req.db_path = self.db_path.clone();
tracing::debug!(
db_path = %self.db_path,
Expand All @@ -127,7 +127,7 @@ impl SqliteAnalysisAgent {
)?;

let start = Instant::now();
let result: anyhow::Result<manager_tools::types::ToolResponse> =
let result: anyhow::Result<nocodo_tools::types::ToolResponse> =
self.tool_executor.execute(tool_request).await;
let execution_time = start.elapsed().as_millis() as i64;

Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/src/sqlite_analysis/tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;
use crate::database::Database;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::claude::ClaudeClient;
use nocodo_tools::ToolExecutor;
use rusqlite::Connection;
use std::path::PathBuf;
use tempfile::NamedTempFile;
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/src/structured_json/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::{database::Database, Agent};
use anyhow;
use async_trait::async_trait;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::client::LlmClient;
use nocodo_llm_sdk::types::{CompletionRequest, ContentBlock, Message, ResponseFormat, Role};
use nocodo_tools::ToolExecutor;
use std::sync::Arc;

mod validator;
Expand Down
2 changes: 1 addition & 1 deletion nocodo-agents/src/structured_json/tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::*;
use crate::database::Database;
use manager_tools::ToolExecutor;
use nocodo_llm_sdk::client::LlmClient;
use nocodo_llm_sdk::error::LlmError;
use nocodo_llm_sdk::types::{CompletionRequest, CompletionResponse, ContentBlock, Role, Usage};
use nocodo_tools::ToolExecutor;
use std::path::PathBuf;
use std::sync::Arc;

Expand Down
Loading