From edf99cb06a502d5653b73e7ed935696b9b933e48 Mon Sep 17 00:00:00 2001 From: taggart_comet Date: Sun, 11 Jan 2026 12:12:03 +0200 Subject: [PATCH] init --- src/domain/prompting/session.rs | 0 src/domain/prompting/tools.rs | 0 src/domain/startup/mod.rs | 0 src/domain/startup/service.rs | 0 src/domain/tools/change/mod.rs | 17 +++++++++++++++++ src/domain/tools/change/remove.rs | 28 ++++++++++++++++++++++++++++ src/domain/tools/change/replace.rs | 29 +++++++++++++++++++++++++++++ src/domain/tools/finish.rs | 0 src/domain/tools/list_objects.rs | 27 +++++++++++++++++++++++++++ src/domain/tools/read_objects.rs | 29 +++++++++++++++++++++++++++++ src/domain/workflow/mod.rs | 0 src/domain/workflow/plan.rs | 0 src/domain/workflow/step.rs | 0 src/domain/workflow/toolset.rs | 0 src/domain/workflow/workflow.rs | 0 15 files changed, 130 insertions(+) create mode 100644 src/domain/prompting/session.rs create mode 100644 src/domain/prompting/tools.rs create mode 100644 src/domain/startup/mod.rs create mode 100644 src/domain/startup/service.rs create mode 100644 src/domain/tools/change/mod.rs create mode 100644 src/domain/tools/change/remove.rs create mode 100644 src/domain/tools/change/replace.rs create mode 100644 src/domain/tools/finish.rs create mode 100644 src/domain/tools/list_objects.rs create mode 100644 src/domain/tools/read_objects.rs create mode 100644 src/domain/workflow/mod.rs create mode 100644 src/domain/workflow/plan.rs create mode 100644 src/domain/workflow/step.rs create mode 100644 src/domain/workflow/toolset.rs create mode 100644 src/domain/workflow/workflow.rs diff --git a/src/domain/prompting/session.rs b/src/domain/prompting/session.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/prompting/tools.rs b/src/domain/prompting/tools.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/startup/mod.rs b/src/domain/startup/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/startup/service.rs b/src/domain/startup/service.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/tools/change/mod.rs b/src/domain/tools/change/mod.rs new file mode 100644 index 0000000..0dfc098 --- /dev/null +++ b/src/domain/tools/change/mod.rs @@ -0,0 +1,17 @@ +pub mod change; +mod find_files; +mod read_file; +mod find_objects; +mod structure; + +pub use find_files::FindFiles; +pub use find_objects::FindObjects; +pub use read_file::ReadFile; +pub use structure::Structure; + +pub trait Tool { + fn name(&self) -> &'static str; + fn work(&self, input: &str) -> &'static str; + fn desc(&self) -> &'static str; + fn format(&self) -> &'static str; +} diff --git a/src/domain/tools/change/remove.rs b/src/domain/tools/change/remove.rs new file mode 100644 index 0000000..ee8ee12 --- /dev/null +++ b/src/domain/tools/change/remove.rs @@ -0,0 +1,28 @@ +use tools::Tool; + +pub struct Insert; + +impl Tool for Insert { + fn name(&self) -> &'static str { + "change" + } + + fn work(&self, _input: &str) -> &'static str { + "" + } + + fn desc(&self) -> &'static str { + "Apply an edit to an existing file" + } + + fn format(&self) -> &'static str { + " +input: + target_line: string # line in the file where to insert the change + insert_content: string # content to insert +output: + ok: boolean + error: string # optional +" + } +} diff --git a/src/domain/tools/change/replace.rs b/src/domain/tools/change/replace.rs new file mode 100644 index 0000000..85cd94b --- /dev/null +++ b/src/domain/tools/change/replace.rs @@ -0,0 +1,29 @@ +use crate::domain::tools::Tool; + +pub struct Insert; + +impl Tool for Insert { + fn name(&self) -> &'static str { + "change_insert" + } + + fn work(&self, _input: &str) -> String { + String::new() + } + + fn desc(&self) -> &'static str { + "Apply an edit to an existing file" + } + + fn format(&self) -> &'static str { + " +input: + file_name: string # full path to the file + target_line: string # line in the file where to insert the change + insert_content: string # content to insert +output: + ok: boolean + error: string # optional +" + } +} diff --git a/src/domain/tools/finish.rs b/src/domain/tools/finish.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/tools/list_objects.rs b/src/domain/tools/list_objects.rs new file mode 100644 index 0000000..7d7c0ba --- /dev/null +++ b/src/domain/tools/list_objects.rs @@ -0,0 +1,27 @@ +use crate::domain::tools::Tool; + +pub struct FindObjects; + +impl Tool for FindObjects { + fn name(&self) -> &'static str { + "find_objects" + } + + fn work(&self, _input: &str) -> &'static str { + "" + } + + fn desc(&self) -> &'static str { + "Lists objects by query (stub)" + } + + fn format(&self) -> &'static str { + " +input: + file_name: string # full path to the file + query: string # what to search for +output: + results: array[string] +" + } +} diff --git a/src/domain/tools/read_objects.rs b/src/domain/tools/read_objects.rs new file mode 100644 index 0000000..c802a35 --- /dev/null +++ b/src/domain/tools/read_objects.rs @@ -0,0 +1,29 @@ +use crate::domain::tools::Tool; + +pub struct ListObjects; + +impl Tool for ListObjects { + fn name(&self) -> &'static str { + "list_objects" + } + + fn work(&self, _input: &str) -> &'static str { + "" + } + + fn desc(&self) -> &'static str { + "Lists language-aware-objects in a file (like functions, classes, etc.)" + } + + fn format(&self) -> &'static str { + " +input: + file_name: string # full path to the file +output: + results: + classes: [string] + functions: [string] + constants: [string] +" + } +} diff --git a/src/domain/workflow/mod.rs b/src/domain/workflow/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/workflow/plan.rs b/src/domain/workflow/plan.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/workflow/step.rs b/src/domain/workflow/step.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/workflow/toolset.rs b/src/domain/workflow/toolset.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/domain/workflow/workflow.rs b/src/domain/workflow/workflow.rs new file mode 100644 index 0000000..e69de29