Skip to content

feat(plugins): add runtime-backed Plugin Doctor - #82012

Merged
teknium1 merged 3 commits into
mainfrom
feat/plugin-developer-tooling-64230
Aug 12, 2026
Merged

feat(plugins): add runtime-backed Plugin Doctor#82012
teknium1 merged 3 commits into
mainfrom
feat/plugin-developer-tooling-64230

Conversation

@teknium1

@teknium1 teknium1 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Plugin authors can validate a plugin against Hermes’ real discovery, import, and registration runtime with hermes plugins doctor, while the canonical author guide now documents the plugin contracts already available on current Hermes.

This preserves the useful work from @zapabob and @webdevtodayjason without shipping a separate Doctor plugin, scaffold convention, or public testkit API.

Changes

  • Adds hermes plugins doctor [path-or-id] [--ci] to the existing plugin command tree.
  • Runs the real manifest scanner, namespaced importer, register(ctx), hook registry, and tool registry.
  • Reports registration/import failures, invalid hook names, callbacks missing forward-compatible **kwargs, and declared-versus-registered tool/hook drift.
  • Uses a temporary HERMES_HOME, blocks direct Python socket connects as an accidental-network guard, and restores tool, module, and override-policy state.
  • Exits non-zero for errors under --ci; warnings remain diagnostic.
  • Folds current tool-override, API observer hook, and middleware contracts into the canonical plugin-author guide.
  • Replaces the duplicate bundled Plugin Doctor implementation with this existing-command-tree surface.
  • Explicitly excludes hermes plugins new and a public installed-wheel testkit.

Plugin Doctor executes plugin registration code in-process and is not a sandbox.

Validation

Contract Result
Plugin/CLI focused suites 98 passed
Live valid plugin Exit 0; one tool and one hook registered
Live invalid callback Exit 1; missing **kwargs reported
Runtime cleanup Tool, module, and trust-policy state restored
Docusaurus production build Passed for English and Chinese
Ruff Passed
Windows footgun scan Passed
Attribution and diff checks Passed

Closes #64230.

Infographic

Plugin Doctor runtime validation

zapabob and others added 3 commits August 8, 2026 13:36
Per review, docs/plugins.md was a parallel guide outside the published
navigation. Its genuinely unique material moves into
website/docs/developer-guide/plugins/index.md: the middleware
registration surface (all four VALID_MIDDLEWARE kinds with contracts and
chaining rules), the per-API-call request hooks, and the
allow_tool_override operator grant (which also fixes pre-existing text
implying override=True alone suffices for non-bundled plugins). Every
migrated claim was re-verified against current main; stale material
(deep-copy claim, approval-surface coverage, a hook that is not in
VALID_HOOKS on main) was corrected or dropped rather than copied.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnMCvi2vXqfs996AjVeF2F
Validate plugin manifests, imports, hook signatures, and runtime registrations through the real plugin loader in an isolated temporary home.
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 16c20b9

⚠️ Warnings

OSV vulnerability scan · View job

64 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 3m55s vs 6m36s (-40.7%). 15 job(s) slower, 8 faster, 1 unchanged.

  • Docs Site / docs-site-checks: +25.0s
  • Python tests / Run tests slice 6/12: +19.0s
  • Python tests / e2e: +18.0s
  • Python tests / Run tests slice 9/12: -14.0s
  • Python tests / Run tests slice 3/12: -13.0s

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins labels Aug 8, 2026
@webdevtodayjason

Copy link
Copy Markdown
Contributor

Salvage looks right to me, thanks for carrying it over with attribution. The folded guide content covers what #58538 was after, and doing Doctor as a real command against the actual runtime instead of a bundled plugin is the better call. Happy to close #58538 once this lands, and glad to keep feeding the author guide as the plugin contracts evolve.

@teknium1
teknium1 merged commit 7a5062f into main Aug 12, 2026
46 checks passed
@teknium1
teknium1 deleted the feat/plugin-developer-tooling-64230 branch August 12, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(plugins): developer tooling — scaffold, Plugin Doctor, standalone test harness

4 participants