Skip to content

fix(plugins): make bundled validation recognize hook declarations - #108386

Closed
fangliquanflq wants to merge 2 commits into
NousResearch:mainfrom
fangliquanflq:fix/plugins-bundled-manifest-hooks
Closed

fangliquanflq wants to merge 2 commits into
NousResearch:mainfrom
fangliquanflq:fix/plugins-bundled-manifest-hooks

Conversation

@fangliquanflq

@fangliquanflq fangliquanflq commented Sep 11, 2026 •

Copy link
Copy Markdown

What does this PR do?

Three bundled plugins declare registered runtime hooks under an unconsumed hooks manifest key, so hermes plugins validate reports those registrations as undeclared and hermes plugins doctor emits warnings. Five memory-provider manifests also use that inert key for provider lifecycle methods that are not hook registrations. This change renames the three real hook declarations to provides_hooks and removes the five misleading lifecycle declarations.

Trigger: hermes_cli/plugins_manifest.py:477 reads provides_hooks, while the affected bundled manifests use hooks.

Causal chain:

  1. Plugin discovery loads an affected bundled manifest.
  2. The unknown hooks key is ignored, leaving PluginManifest.provides_hooks empty.
  3. Validation compares live hook registrations with that empty declaration and reports undeclared hooks.

Working contrast: Bundled manifests that declare tools already use the consumed provides_tools key. The corresponding hook capability key is provides_hooks.

Ruled out: The runtime hook registrations are not missing. Validation observes them and reports them specifically because their manifest declarations were not parsed.

Related Issue

Closes #108371

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Changes Made

  • Rename hooks to provides_hooks for disk-cleanup, Google Meet, and Langfuse, preserving their registered hook values.
  • Remove inert hooks declarations from five memory-provider manifests whose values name provider lifecycle methods rather than registered hooks.
  • Leave plugins/security-guidance/plugin.yaml to its existing dedicated PR.

How to Test

  1. Validate each of the eight affected plugin directories with validate_plugin_dir; all eight pass.
  2. Run the focused plugin manifest and validation tests:
scripts/run_tests.sh tests/hermes_cli/test_plugin_dev.py tests/hermes_cli/test_plugin_validate.py

Result: 18 tests passed.

Checklist

Code

  • I've read the Contributing Guide.
  • My commit message follows Conventional Commits.
  • I searched existing PRs to make sure this is not a duplicate.
  • This PR contains only changes related to this fix.
  • I ran the repository test entry on the focused tests and all tests pass.
  • Existing capability-validation tests cover the corrected manifest contract; no new runtime logic was introduced.
  • I tested on Windows 11.

Documentation & Housekeeping

  • Documentation updates are not applicable because this corrects existing manifest declarations.
  • Config example updates are not applicable because no config key changes.
  • Architecture and workflow documentation updates are not applicable.
  • Cross-platform impact is limited to platform-independent YAML manifest parsing.
  • Tool descriptions and schemas are unchanged.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels Sep 11, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks @fangliquanflq — both commits cherry-picked as-is; together with #97765 this resolves #108371.

Salvaged into #118841 with your authorship preserved (merge 74f726c). Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-up to #97765: unconsumed hooks: field remains in 8 bundled plugin manifests — plugins validate fails, doctor warns

3 participants