package plugin // ManifestType represents the plugin category. type ManifestType string const ( TypeBackend ManifestType = "backend" TypeFrontend ManifestType = "frontend" TypeTheme ManifestType = "theme" TypeHook ManifestType = "hook" TypeMCP ManifestType = "mcp_tool" ) // Manifest is the metadata contract for a .mengplugin package. type Manifest struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` Description string `json:"description"` Author Author `json:"author"` Type ManifestType `json:"type"` MinHostVersion string `json:"min_host_version"` MaxHostVersion string `json:"max_host_version,omitempty"` Permissions Permissions `json:"permissions"` Dependencies []Dependency `json:"dependencies,omitempty"` Entry Entry `json:"entry"` Icon string `json:"icon,omitempty"` Homepage string `json:"homepage,omitempty"` License string `json:"license,omitempty"` } // Author identifies the plugin creator. type Author struct { Name string `json:"name"` Email string `json:"email,omitempty"` URL string `json:"url,omitempty"` } // Permissions declares what the plugin needs access to. type Permissions struct { Database []string `json:"database,omitempty"` Storage bool `json:"storage,omitempty"` Network []string `json:"network,omitempty"` Events []string `json:"events,omitempty"` Routes []string `json:"routes,omitempty"` AdminPanel bool `json:"admin_panel,omitempty"` } // Dependency declares a required plugin or kernel module. type Dependency struct { ID string `json:"id"` Version string `json:"version"` } // Entry points to the plugin's executable and configuration. type Entry struct { Binary string `json:"binary"` Config string `json:"config,omitempty"` Migrate string `json:"migrate,omitempty"` }