Skills: chatbot tool calling on the WP Abilities API - #209
Open
HardeepAsrani wants to merge 5 commits into
Open
Conversation
HardeepAsrani
force-pushed
the
feat/issue-195
branch
from
July 23, 2026 09:00
82d56b8 to
da78dd4
Compare
Soare-Robert-Daniel
approved these changes
Jul 23, 2026
The prompt reformat left apply_system_prompt without its doc comment (PHPCS) and its inferred param/return types (PHPStan), and preg_replace's string|null return was passed to trim. Reorder the compact_prompt helper above apply_system_prompt so each keeps its own doc block, and cast the preg_replace result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Skills: the chatbot can call tools during a reply, built on the WordPress Abilities API (WP 6.9+). Admins pick which of the site's registered read-only abilities the bot may use, and Hyve ships its own curated packs (WooCommerce storefront lookups and a site content search). Closes https://github.com/Codeinwp/hyve/issues/195.
Everything functional is Pro. This plugin holds the engine seams and the widget rendering; the framework, settings UI, packs, and REST routes live in the Hyve Pro PR. The platform side for Hyve Connect is in the agents PR.
Pro PR: https://github.com/Codeinwp/hyve/pull/269
Agents PR: https://github.com/Codeinwp/agents/pull/153
What it does
Skills. Under Settings, Integrations, Skills, admins enable tool calling and pick abilities from what plugins registered on the Abilities API. Only read-only abilities are offered; WordPress core's own are hidden. Skills appear grouped per plugin, with Hyve's packs first, framed as experimental.
Hyve's packs.
Display cards. A skill can return a generic display payload (list or single item: label, description, meta, image, url, optional action pills). The widget renders the cards and the model only writes a one line intro, so lists render instantly and the model cannot mangle details. Cards are stored with the transcript and replay from history.
Both engines.
hyve/v1/skill-runroute. Everything the token grants (allowlist snapshot, visitor identity) is bound server-side at mint time, and display cards plus cited posts never leave the site.How it's split
Manual QA
Needs an active Pro license, WordPress 6.9+, and WooCommerce for the store pack.
Unit tests cover discovery and mapping, loop plumbing (call pairing, display capture and sanitizing, abort), both packs, the Connect token binding and callback, and the platform loop; Playwright covers the settings screen and widget card rendering.