- 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.
29 lines
758 B
Go
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),
|
|
}
|
|
}
|