- Introduced multiple executor modes (Standard, DryRun, Sandbox) to accommodate various use cases, enhancing flexibility in execution strategies. - Updated DESIGN.md to reflect the new executor modes and their respective use cases, including detailed descriptions and configuration examples. - Revised TECHNICAL.md to outline the new executor package structure, emphasizing the modular design for future enhancements. - Enhanced the TODO.md to track the progress of executor mode implementations and related tasks. - Removed outdated executor stub files and tests, streamlining the codebase for improved maintainability. - Updated integration tests to utilize the new DryRun executor, ensuring comprehensive coverage of execution scenarios without real agent calls.
32 lines
790 B
Go
32 lines
790 B
Go
package standard
|
|
|
|
import (
|
|
robottypes "github.com/yaoapp/yao/agent/robot/types"
|
|
)
|
|
|
|
// RunTasks executes P2: Tasks phase
|
|
// Calls the Tasks Agent to break down goals into executable tasks
|
|
//
|
|
// Input:
|
|
// - Goals (from P1)
|
|
// - Available resources (Agents, MCP tools)
|
|
//
|
|
// Output:
|
|
// - List of Task objects with executor assignments
|
|
//
|
|
// TODO: Implement real Agent call
|
|
func (e *Executor) RunTasks(ctx *robottypes.Context, exec *robottypes.Execution, _ interface{}) error {
|
|
e.simulateStreamDelay()
|
|
|
|
exec.Tasks = []robottypes.Task{
|
|
{
|
|
ID: "task-1",
|
|
GoalRef: "Goal 1",
|
|
Source: robottypes.TaskSourceAuto,
|
|
ExecutorType: robottypes.ExecutorAssistant,
|
|
ExecutorID: "default-assistant",
|
|
Status: robottypes.TaskPending,
|
|
},
|
|
}
|
|
return nil
|
|
}
|