plugininspect

package
v0.2.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package inspect derives a bounded, sanitized description of what a plugin package contributes.

It reads a package the way a run would — the same manifest, MCP, hook, and subagent parsers — but produces a report rather than a runtime. Publication and `plugin validate` both use it, which is why it depends only on core: a second implementation would let a package pass one check and fail the other.

It is a subpackage because internal/core/subagent already depends on internal/core/plugin for the layer vocabulary, so the parent cannot import it back.

What it deliberately does not carry: command arguments, header values, environment values, prompt text, and file contents. A catalog record is not a place to publish the inside of somebody's configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	Manifest  plugin.Manifest
	Skills    []string
	Subagents []plugin.Subagent
	MCP       []plugin.MCPServer
	Hooks     []plugin.Hook

	// EnvRefs are the environment variable names the payload reads, sorted.
	// Names only: a value here would be a secret in a catalog record.
	EnvRefs []string

	// PluginPaths are files inside the package that its own configuration
	// reaches for, sorted and relative to the plugin root.
	PluginPaths []string

	Findings []plugin.Finding
}

Package is what one plugin directory contributes.

func Dir

func Dir(fsys fs.FS) (Package, error)

Dir inspects a plugin package rooted at fsys.

The returned error means there is no manifest to describe — every other problem is a finding, so one broken file still yields a report of everything else the package holds.

func (Package) HasErrors

func (p Package) HasErrors() bool

HasErrors reports whether anything found would stop the package loading.

Jump to

Keyboard shortcuts

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