30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

v0.1.4 — F030 Per-server ability permission_callback override

Feature 030 — Per-server ability permission_callback override

The MCP-server-edit Access Control tab now hosts a second section (below the existing wpb-access-control React panel, separated by <hr>) with a single toggle: when enabled, every ability exposed to this MCP server via the Abilities tab bypasses its own permission_callback for MCP requests routed to this server. Site-wide ability callers (WP admin, non-MCP REST namespaces, WP-CLI) see the original permission_callback unchanged — the closure short-circuits when CurrentServerHolder is empty.

Runtime filter registers on wp_register_ability_args at priority 999999, strictly higher than sibling acrossai-abilities-manager's P100000 injector and this plugin's own CallbackReplacer P10, so the operator toggle wins deterministically.

Six defensive layers (DEC-F030-PERMISSION-CALLBACK-OPERATOR-OPT-IN-BYPASS)

  1. manage_options capability re-verified inside the save handler
  2. Per-server nonce (acrossai_mcp_manager_permission_override_{server_id})
  3. Persistent warning banner when the flag is currently ON
  4. Native confirm() prompt fired on submit-to-ON
  5. CurrentServerHolder scope (only in-flight MCP requests to THIS server)
  6. ExposureResolver::resolve() gate (only abilities toggled ON in the Abilities tab)

Schema

Adds one column via D28 3-part BerlinDB contract:

  • MCPServer\Table $version 1.1.1 → 1.1.2
  • upgrade_to_1_1_2() idempotent ALTER guarded by INFORMATION_SCHEMA.COLUMNS
  • override_abilities_permission tinyint(1) NOT NULL DEFAULT 0 — default preserves prior behavior on upgrade

Observability

Fires do_action('acrossai_mcp_permission_override_toggled', $server_id, $value, $user_id, $timestamp) on every save (D19 fail-open pattern). Operators can attach any logger (Query Monitor, custom audit table, syslog) without a hard dependency.

Abilities Manager promotional card

Access Control tab now also renders a promo card for the sibling acrossai-abilities-manager plugin (already in acrossai-co/main-menu's baseline addon list — no double-register). Card links to the shared Add-ons page for install/activate OR to admin.php?page=acrossai-abilities-manager when active. Below the card, a <details> "Prefer to use code?" block documents the WordPress core filter (wp_register_ability_args, priority 999999) for developers who prefer not to install another plugin.

Bonus — Test-infrastructure fix

tests/phpunit/{Abilities,Database,MCP}/ were orphaned in phpunit.xml.dist — no suite covered them, so CI never ran F011/F017/F026 legacy tests OR any F030 new tests. Fixed by adding 3 new PHPUnit suites (abilities, database, mcp) + 3 matching CI workflow steps in .github/workflows/phpunit.yml. All previously-orphaned tests + all F030 new tests now execute in CI on every push.

Durable memory captured

  • D29 — six-layer defensive gating framework for any future permission_callback bypass (scoped carve-out from D24)
  • D30 — F030 intentionally passes empty $meta to ExposureResolver::resolve() (scoped carve-out from DEC-ABILITY-OVERRIDE-RESOLUTION)
  • B35 — wp_register_ability_args filter-priority slot map (P10 CallbackReplacer, P100000 sibling, P999999 F030)
  • B36 — inline <script> string-interpolation requires wp_json_encode(), not esc_html/esc_attr (generalizable JS-context escaping rule)
  • DEV5 — per-server-edit tab hand-rolled admin form exception to §IV DataForm mandate (D13 escalation ≥ 2 features)

Internal

  • ACROSSAI_MCP_MANAGER_VERSION constant bumped to 0.1.4 matching the plugin header
  • Plugin Version: header + Stable tag: in README.txt bumped to 0.1.4

PRs merged in this release

  • #39 — feat(abilities+admin+db): F030 — Per-server ability permission_callback override (feature + tests + docs + memory)
  • #40 — chore(release): 0.1.4 — F030 Per-server ability permission_callback override (version bump)

Full Changelog: v0.1.3…v0.1.4


Keep reading