Adds a declarative blueprint.{yaml,json} manifest layer on top of the existing dynamic-module plugin loader. Each plugin can now ship as a self-contained package with a manifest describing name, version, author, type, entrypoint class, and capabilities. The legacy flat .py plugin format remains fully supported.
Manifest schema v1 with fields: schema_version, name (slug), version (semver), author, type (metadata_extractor), entrypoint.{module,class}, optional capabilities/tags/license/homepage/description/min_majoor_version. Path-traversal and module-name injection are rejected at parse time. YAML manifests require PyYAML (already shipped by ComfyUI core); JSON manifests need no extra deps.
Loader: PluginLoader.discover_plugins now treats subdirectories with a blueprint manifest as blueprint packages (taking precedence over plain Python-package scanning). New PluginLoader.blueprints property and get_stats[blueprints] field expose loaded manifests for listing endpoints.
Migrated bundled examples to blueprint layout: plugins/examples/wanvideo/, plugins/examples/custom_node_template/, plugins/examples/rgthree/ (YAML variant).
Tests: 11 new tests in tests/features/test_blueprint_plugins.py covering manifest parsing edge cases (bad name, bad semver, unknown type, path traversal, schema mismatch), YAML support, discovery skipping invalid manifests, and loader integration including a missing-entrypoint warning path.
23 lines
567 B
YAML
23 lines
567 B
YAML
# Blueprint manifest example using YAML.
|
|
# JSON is also supported (see ../wanvideo/blueprint.json).
|
|
schema_version: 1
|
|
|
|
name: rgthree_extractor
|
|
version: "0.1.0"
|
|
author: "Majoor Assets Manager"
|
|
description: "Skeleton extractor for rgthree custom-node workflows."
|
|
license: MIT
|
|
type: metadata_extractor
|
|
|
|
entrypoint:
|
|
module: rgthree_extractor # filename without .py, inside this directory
|
|
class: RgthreeExtractor # class implementing MetadataExtractorPlugin
|
|
|
|
capabilities:
|
|
supported_extensions: [".png", ".webp"]
|
|
priority: 50
|
|
|
|
tags:
|
|
- rgthree
|
|
- skeleton
|