Refactor IPC and DTO structures; remove unused code and streamline message handling
- Removed unused structs and methods from `response.rs`, `usage.rs`, and `client.rs`. - Simplified `Connection` handling in `conn.rs` to only support Unix sockets. - Updated `IpcServer` to exclusively use Unix sockets and removed TCP handling. - Cleaned up `editlog.rs` by removing loading and recent entry methods. - Refactored `memory.rs` to eliminate unused functions related to lesson promotion and retrospective creation. - Enhanced `search.rs` to support multiple search providers and improved error handling. - Updated chat view logic to simplify message display and improve user experience. - Removed deprecated modules and constants from various files to streamline the codebase.
This commit is contained in:
+37
-3
@@ -11,7 +11,7 @@ impl Tool for WorkflowRun {
|
||||
}
|
||||
|
||||
fn description(&self) -> &'static str {
|
||||
"Execute a workflow script by delegating to the workflow engine"
|
||||
"Execute a workflow script that can spawn multiple subagents in parallel, pipeline, or phased stages. Use when a task benefits from decomposition into independent subtasks. Simple tasks should be handled inline without this tool."
|
||||
}
|
||||
|
||||
fn parameters(&self) -> Value {
|
||||
@@ -20,11 +20,11 @@ impl Tool for WorkflowRun {
|
||||
"properties": {
|
||||
"script": {
|
||||
"type": "string",
|
||||
"description": "Workflow script content or path to a workflow file"
|
||||
"description": "JSON-encoded workflow script with name, description, script (Agent/Parallel/Pipeline/Phase primitives), and options (max_concurrency, continue_on_error)"
|
||||
},
|
||||
"args": {
|
||||
"type": "object",
|
||||
"description": "Optional arguments passed to the workflow script"
|
||||
"description": "Optional string key-value arguments passed to the workflow script for template substitution ({{key}} placeholders)"
|
||||
}
|
||||
},
|
||||
"required": ["script"]
|
||||
@@ -52,3 +52,37 @@ impl Tool for WorkflowRun {
|
||||
crate::app::workflow::engine::run_workflow(&workflow_script, &workflow_args)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct NoteFinding;
|
||||
|
||||
impl Tool for NoteFinding {
|
||||
fn name(&self) -> &'static str {
|
||||
"note_finding"
|
||||
}
|
||||
|
||||
fn description(&self) -> &'static str {
|
||||
"Share a finding with sibling agents in the same workflow_run. Findings are ephemeral to the current run and will be prepended to other agents' next tool-round context. Does not persist to memory."
|
||||
}
|
||||
|
||||
fn parameters(&self) -> Value {
|
||||
json!({
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The finding to share with sibling agents"
|
||||
}
|
||||
},
|
||||
"required": ["text"]
|
||||
})
|
||||
}
|
||||
|
||||
fn run(&self, _ctx: &ToolCtx, args: &Value) -> Result<String> {
|
||||
let text = args.get("text")
|
||||
.and_then(|v| v.as_str())
|
||||
.ok_or_else(|| anyhow!("missing required argument: text"))?;
|
||||
|
||||
crate::app::workflow::engine::note_finding(text);
|
||||
Ok(format!("finding recorded: {}", text.chars().take(80).collect::<String>()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user