Files
mcphub/plugins/wordpress/handlers/__init__.py
airano-ir f203ca88de
Some checks failed
Release / Test before release (push) Has been cancelled
Release / Publish to PyPI (push) Has been cancelled
Release / Publish to Docker Hub (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
feat(v3.12.0): media pipeline, AI image generation, capability probe, companion v2.9.0
Three-month batch sync from internal repo (~80 commits) covering Tracks F.5a, F.7e, F.8, F.17, F.18, F.X.

WordPress media pipeline
- Pillow-based optimization, AI image generation (OpenAI / Stability / Replicate / Google Nano Banana / OpenRouter), chunked + resumable uploads, bulk delete/reassign, idempotent retries.

Capability discovery (F.7e)
- Per-site credential probe + adapters for WordPress / WooCommerce / Gitea, tier-fit unions granted ∪ roles, capability badge UI with HTMX partial re-check, install hint in every companion-unreachable error.

Companion plugin overhaul
- Renamed wordpress-plugin/airano-mcp-seo-bridge → wordpress-plugin/airano-mcp-bridge.
- Eight new endpoints: /capabilities, /bulk-meta, /export, /cache-purge, /transient-flush, /site-health, /audit-hook, /upload-and-attach.
- wp.org Plugin Check pass: i18n, WP_Filesystem, scheme allowlist on audit-hook URL.

Other
- Gitea ergonomics (F.17): batch files, tree, search, compare, releases, fork.
- Opportunistic bcrypt upgrade for legacy SHA-256 admin keys (F.8).
- n8n refactor: structured errors, capability probe, missing tools backfilled.
- Idempotency-Key dedup for AI media upload retries; WP client fast-fails on unreachable sites.

Docs
- README + CLAUDE.md drop the fixed "633 tools" claim. The total grows with each release; per-plugin approximations + dashboard-surfaced counts replace it.
- Tools/Tests badges removed in favour of "Plugins: 10".

Deployment
- PyPI mirror chain, optional BUILD_HTTP_PROXY, Alpine→Yandex apk mirror, Debian-slim Plan-B Dockerfile, mirror.gcr.io variant.

CI
- Black + Ruff clean on Python 3.12; pytest tests/ green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 16:25:58 +02:00

145 lines
5.9 KiB
Python

"""
WordPress Handlers
Modular handlers for WordPress functionality.
Each handler is responsible for a specific domain of WordPress operations.
Part of Option B clean architecture refactoring.
"""
from plugins.wordpress.handlers.ai_media import AIMediaHandler
from plugins.wordpress.handlers.ai_media import get_tool_specifications as get_ai_media_specs
from plugins.wordpress.handlers.audit_hook import AuditHookHandler
from plugins.wordpress.handlers.audit_hook import (
get_tool_specifications as get_audit_hook_specs,
)
from plugins.wordpress.handlers.bulk_meta import BulkMetaHandler
from plugins.wordpress.handlers.bulk_meta import get_tool_specifications as get_bulk_meta_specs
from plugins.wordpress.handlers.cache_purge import CachePurgeHandler
from plugins.wordpress.handlers.cache_purge import (
get_tool_specifications as get_cache_purge_specs,
)
from plugins.wordpress.handlers.capabilities import CapabilitiesHandler
from plugins.wordpress.handlers.capabilities import (
get_tool_specifications as get_capabilities_specs,
)
from plugins.wordpress.handlers.comments import CommentsHandler
from plugins.wordpress.handlers.comments import get_tool_specifications as get_comments_specs
from plugins.wordpress.handlers.coupons import CouponsHandler
from plugins.wordpress.handlers.coupons import get_tool_specifications as get_coupons_specs
from plugins.wordpress.handlers.customers import CustomersHandler
from plugins.wordpress.handlers.customers import get_tool_specifications as get_customers_specs
from plugins.wordpress.handlers.export import ExportHandler
from plugins.wordpress.handlers.export import get_tool_specifications as get_export_specs
from plugins.wordpress.handlers.media import MediaHandler
from plugins.wordpress.handlers.media import get_tool_specifications as get_media_specs
from plugins.wordpress.handlers.media_attach import MediaAttachHandler
from plugins.wordpress.handlers.media_attach import (
get_tool_specifications as get_media_attach_specs,
)
from plugins.wordpress.handlers.media_bulk import MediaBulkHandler
from plugins.wordpress.handlers.media_bulk import (
get_tool_specifications as get_media_bulk_specs,
)
from plugins.wordpress.handlers.media_chunked import MediaChunkedHandler
from plugins.wordpress.handlers.media_chunked import (
get_tool_specifications as get_media_chunked_specs,
)
from plugins.wordpress.handlers.media_probe import ProbeHandler
from plugins.wordpress.handlers.media_probe import (
get_tool_specifications as get_media_probe_specs,
)
from plugins.wordpress.handlers.menus import MenusHandler
from plugins.wordpress.handlers.menus import get_tool_specifications as get_menus_specs
from plugins.wordpress.handlers.orders import OrdersHandler
from plugins.wordpress.handlers.orders import get_tool_specifications as get_orders_specs
from plugins.wordpress.handlers.posts import PostsHandler
from plugins.wordpress.handlers.posts import get_tool_specifications as get_posts_specs
from plugins.wordpress.handlers.products import ProductsHandler
from plugins.wordpress.handlers.products import get_tool_specifications as get_products_specs
from plugins.wordpress.handlers.regenerate_thumbnails import RegenerateThumbnailsHandler
from plugins.wordpress.handlers.regenerate_thumbnails import (
get_tool_specifications as get_regenerate_thumbnails_specs,
)
from plugins.wordpress.handlers.reports import ReportsHandler
from plugins.wordpress.handlers.reports import get_tool_specifications as get_reports_specs
from plugins.wordpress.handlers.seo import SEOHandler
from plugins.wordpress.handlers.seo import get_tool_specifications as get_seo_specs
from plugins.wordpress.handlers.site import SiteHandler
from plugins.wordpress.handlers.site import get_tool_specifications as get_site_specs
from plugins.wordpress.handlers.site_health import SiteHealthHandler
from plugins.wordpress.handlers.site_health import (
get_tool_specifications as get_site_health_specs,
)
from plugins.wordpress.handlers.taxonomy import TaxonomyHandler
from plugins.wordpress.handlers.taxonomy import get_tool_specifications as get_taxonomy_specs
from plugins.wordpress.handlers.transient_flush import TransientFlushHandler
from plugins.wordpress.handlers.transient_flush import (
get_tool_specifications as get_transient_flush_specs,
)
from plugins.wordpress.handlers.users import UsersHandler
from plugins.wordpress.handlers.users import get_tool_specifications as get_users_specs
from plugins.wordpress.handlers.wp_cli import WPCLIHandler
from plugins.wordpress.handlers.wp_cli import get_tool_specifications as get_wp_cli_specs
__all__ = [
# Core Handlers
"PostsHandler",
"MediaHandler",
"MediaAttachHandler",
"MediaBulkHandler",
"MediaChunkedHandler",
"ProbeHandler",
"AIMediaHandler",
"AuditHookHandler",
"BulkMetaHandler",
"CachePurgeHandler",
"CapabilitiesHandler",
"RegenerateThumbnailsHandler",
"ExportHandler",
"SiteHealthHandler",
"TransientFlushHandler",
"TaxonomyHandler",
"CommentsHandler",
"UsersHandler",
"SiteHandler",
# WooCommerce Handlers
"ProductsHandler",
"OrdersHandler",
"CustomersHandler",
"ReportsHandler",
"CouponsHandler",
# Advanced Handlers
"SEOHandler",
"WPCLIHandler",
"MenusHandler",
# Tool specifications
"get_posts_specs",
"get_media_specs",
"get_media_attach_specs",
"get_media_bulk_specs",
"get_media_chunked_specs",
"get_media_probe_specs",
"get_ai_media_specs",
"get_audit_hook_specs",
"get_bulk_meta_specs",
"get_cache_purge_specs",
"get_capabilities_specs",
"get_regenerate_thumbnails_specs",
"get_export_specs",
"get_site_health_specs",
"get_transient_flush_specs",
"get_taxonomy_specs",
"get_comments_specs",
"get_users_specs",
"get_site_specs",
"get_products_specs",
"get_orders_specs",
"get_customers_specs",
"get_reports_specs",
"get_coupons_specs",
"get_seo_specs",
"get_wp_cli_specs",
"get_menus_specs",
]