yao/agent/robot/robot.go
Max 41e0544aba Refactor Executor Architecture and Update Documentation
- 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.
2026-01-16 15:27:46 +08:00

55 lines
1.4 KiB
Go

package robot
import (
"github.com/yaoapp/yao/agent/robot/cache"
"github.com/yaoapp/yao/agent/robot/dedup"
"github.com/yaoapp/yao/agent/robot/executor"
"github.com/yaoapp/yao/agent/robot/manager"
"github.com/yaoapp/yao/agent/robot/plan"
"github.com/yaoapp/yao/agent/robot/pool"
"github.com/yaoapp/yao/agent/robot/store"
)
var (
// Global instances (will be initialized in Init)
globalManager *manager.Manager
globalCache *cache.Cache
globalPool *pool.Pool
globalDedup *dedup.Dedup
globalStore *store.Store
globalExecutor executor.Executor
globalPlan *plan.Plan
)
// Init initializes the robot agent system
// Stub: placeholder (will be implemented in Phase 3)
func Init() error {
// Initialize global instances
globalCache = cache.New()
globalDedup = dedup.New()
globalStore = store.New()
globalPool = pool.New() // Default pool size
globalExecutor = executor.New()
globalManager = manager.New()
globalPlan = plan.New()
// TODO Phase 3: Start manager and pool
// return globalManager.Start()
return nil
}
// Shutdown gracefully shuts down the robot agent system
// Stub: placeholder (will be implemented in Phase 3)
func Shutdown() error {
// TODO Phase 3: Stop manager and pool
// if globalManager != nil {
// return globalManager.Stop()
// }
return nil
}
// Manager returns the global manager instance
func Manager() *manager.Manager {
return globalManager
}