Help us shape the future of Go! Take the 2026 Go Developer Survey

plugin

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ToolManage = "plugin_manage"

Variables

This section is empty.

Functions

func InputSchema

func InputSchema(name string) (map[string]any, bool)

func OutputSchema

func OutputSchema(name string) (map[string]any, bool)

Types

type CapabilityItem

type CapabilityItem struct {
	Name        string
	Version     string
	Enabled     bool
	Description string
	SkillsCount int
	MCPCount    int
	Format      string
}

type ManageRequest

type ManageRequest struct {
	Action      string `json:"action"`
	Name        string `json:"name,omitempty"`
	Source      string `json:"source,omitempty"`
	Enabled     *bool  `json:"enabled,omitempty"`
	ReviewToken string `json:"review_token,omitempty"`
	DataPolicy  string `json:"data_policy,omitempty"`
}

type Result

type Result = toolcore.Result

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config, manager *pluginruntime.Manager, mcpClients *mcpclient.Manager, envs *envstore.Store, ws *workspace.Workspace) *Service

func (*Service) CapabilityItems

func (s *Service) CapabilityItems() ([]CapabilityItem, error)

func (*Service) InstallReviewedArchive added in v1.1.0

func (s *Service) InstallReviewedArchive(ctx context.Context, archive string, enabled bool, reviewToken string) (Result, error)

InstallReviewedArchive 安装设备已经暂存的候选 ZIP。 资源库下载的包不在用户工作区,不能走 plugin_manage 的 sourcePath; 审核令牌、激活和版本冲突仍使用与普通安装相同的 installResolved。

func (*Service) InstalledPackage added in v1.1.0

func (s *Service) InstalledPackage(name string) (pluginruntime.Installed, error)

InstalledPackage 读取已安装 Plugin 的受管快照。资源库只按名称导出,不接受外部路径。

func (*Service) Manage

func (s *Service) Manage(ctx context.Context, request ManageRequest) (Result, error)

func (*Service) ReconcileMCP

func (s *Service) ReconcileMCP() error

func (*Service) ReleaseMCPLeases

func (s *Service) ReleaseMCPLeases()

ReleaseMCPLeases releases package references after the MCP client manager has closed the corresponding child processes/connections.

func (*Service) RuntimeCount added in v1.0.0

func (s *Service) RuntimeCount() (int, error)

func (*Service) RuntimeList

func (s *Service) RuntimeList() (Result, error)

RuntimeList returns the read-only Plugin index used by the internal Runtime API. It is intentionally not a plugin_manage action because agentdock_context already provides the model-facing Plugin index.

func (*Service) UpdateReviewedArchive added in v1.1.0

func (s *Service) UpdateReviewedArchive(ctx context.Context, archive string, reviewToken string) (Result, error)

UpdateReviewedArchive 升级设备已经暂存的候选 ZIP,确认语义与普通 update 相同。

func (*Service) ValidateLocalArchive added in v1.1.0

func (s *Service) ValidateLocalArchive(ctx context.Context, archive string) (pluginruntime.Review, error)

ValidateLocalArchive 只产生原生审核报告,不安装。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL