yao/registry/manager/agent/agent.go
Max 634bc1d093 Update test scope and remove obsolete E2E tests
- Change the test scope identifier from "@test" to "@yaoagents" in client tests for consistency.
- Remove the outdated E2E test file `e2e_test.go` from the manager directory, as it is no longer needed.
- Enhance the agent manager to utilize the MCP manager for dependency installations, improving the handling of MCP-type dependencies.
2026-03-03 08:48:45 +08:00

29 lines
758 B
Go

// Package agent implements the assistant package manager for the Yao registry.
package agent
import (
"github.com/yaoapp/yao/registry"
"github.com/yaoapp/yao/registry/manager/common"
mcpmgr "github.com/yaoapp/yao/registry/manager/mcp"
)
// Manager handles assistant package operations (add, update, push, fork).
type Manager struct {
client *registry.Client
appRoot string
prompter common.Prompter
mcpMgr *mcpmgr.Manager
}
// New creates an agent Manager.
func New(client *registry.Client, appRoot string, prompter common.Prompter) *Manager {
if prompter == nil {
prompter = &common.StdinPrompter{}
}
return &Manager{
client: client,
appRoot: appRoot,
prompter: prompter,
mcpMgr: mcpmgr.New(client, appRoot, prompter),
}
}