Repository navigation
feat(plugin): Add Plugin evaluation support across all tiers - #28
chrisknvidia wants to merge 195 commits into
Conversation
Restores and rebases the plugin evaluation work from PR #17 onto the rewritten main history. Signed-off-by: Narendran Raghavan <[email protected]>
3a51f76 to
a4a5e63
Compare
Use boundary-aware checks for reserved names, description heuristics, API and error documentation, MCP guidance, time references, README mentions, and nested Markdown links. Add regression coverage for #30. Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
The plugin evaluation implementation and its follow-up hardening are well covered, but I found one small diff-hygiene issue to clean up.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Fresh review found two actionable security issues in the plugin evaluation staging path. The previous EOF-hygiene thread is already fixed and resolved. I will address these findings while updating the branch from current main.
…on-all-tiers Signed-off-by: Narendran Raghavan <[email protected]> # Conflicts: # docs/tier2-deduplication.mdx # src/skillevaluator/deduplication/utils/skill_collector.py # src/skillevaluator/embedding/extractor.py
…on-all-tiers Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…on-all-tiers Signed-off-by: Narendran Raghavan <[email protected]> # Conflicts: # .github/workflows/ci.yml # CHANGELOG.md # src/skillevaluator/tier3/harbor/adapter.py # src/skillevaluator/tier3/harbor/runner.py # src/skillevaluator/utils/secure_fs.py # tests/test_harbor_input_staging.py
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Approved after fresh security review and remediation: all review threads are resolved, the branch is conflict-free against current main, the complete local suite passes (3,999 passed, 21 skipped, 3 deselected), and all 15 GitHub checks pass including Windows, packaging, DCO, and security scans.
…on-all-tiers Signed-off-by: Narendran Raghavan <[email protected]> # Conflicts: # CHANGELOG.md # src/skillevaluator/cli.py # tests/validators/test_policy.py
404ce54 to
27924cf
Compare
* feat(plugin): evaluate native OpenClaw plugin manifests Signed-off-by: Patrick Erichsen <[email protected]> * test: make compatibility checks platform-independent Signed-off-by: Patrick Erichsen <[email protected]> * fix(plugin): report runtime-only OpenClaw evaluations as incomplete Signed-off-by: Patrick Erichsen <[email protected]> * fix(plugin): address OpenClaw evaluation review findings Signed-off-by: Patrick Erichsen <[email protected]> * fix(smoke): distinguish inventory-only root skills from portable members Signed-off-by: Patrick Erichsen <[email protected]> * fix(plugin): preserve source-client skill loading and advisory skips Signed-off-by: Patrick Erichsen <[email protected]> --------- Signed-off-by: Patrick Erichsen <[email protected]>
…in helpers (#391) * feat(plugin): recognize native OpenClaw manifests in the private plugin helpers Port the OpenClaw support from PR #243 (merged into the PR #28 branch) onto main's private plugin pipeline, where one shared inventory feeds the private schema checks, the local-catalog comparisons and runtime preparation. - Locate openclaw.plugin.json after the existing manifest formats; its id is the plugin identity, configSchema must be an object, unknown metadata is kept. - Only declared skill roots are members, searched recursively with the shared bounded, no-follow discovery (plugin_skills.py). Hidden and node_modules children are skipped; no implicit skills/ root. - Inventory package.json#openclaw entrypoints as unsupported extension rows without importing them, and keep an unsupported OpenClaw runtime row. - Normalize OpenClaw MCP servers (transport precedence, SSE default, stdio working directory, unapplied host options). URLs are used verbatim; TLS verification disablement and literal enterprise secrets are blocking. - Runtime preparation never copies the plugin root as a member, refuses stdio servers whose working directory cannot be kept, records unapplied options as incomplete, refuses invalid native manifests and keeps host metadata out of staged manifests. - Native Claude Code staging projects skill declarations per source client: Codex-ignored paths are dropped and undotted Cursor/OpenClaw roots become ./ paths. - Add scripts/ci/smoke_openclaw_plugins.py and regression tests. Co-authored-by: Patrick Erichsen <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * fix(plugins): address OpenClaw port review findings - Native Claude Code staging of an OpenClaw plugin copies only the declared member skills to skills/<name>, never the plugin tree, so Claude Code's default skills/, commands/, agents/, hooks/ and bin/ locations and the raw manifest stay unloaded; bin/ is reported unsupported. - A non-array OpenClaw `skills` value is an invalid declaration that makes the inventory incomplete instead of being compared in Tier 2. - Manifest conflict wording names the OpenClaw id only when both identities are present and differ; version-only mismatches stay version conflicts. - Label an unnamed root skill with the plugin folder name. - Scan OpenClaw MCP `auth` blocks for literal credentials, like `enterprise`. - Make the smoke host-path assertions hold on Windows. Co-authored-by: Patrick Erichsen <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
This PR adds plugin evaluation to every tier of SkillEvaluator. It takes a plugin in any of five manifest formats (
agent_plugin.yaml, Claude Code, Codex, Cursor or Agent Plugins v1), checks its structure and security statically (Tier 1), checks it for duplication (Tier 2), and measures its behavior with live agents (Tier 3), loading it through a generated wrapper skill or natively in Claude Code, Codex and OpenCode. The reports say plainly what was and was not demonstrated.Full documentation:
docs/plugin-evaluation.mdx.How plugin evaluation works
flowchart LR P["Plugin<br/>agent_plugin.yaml · Claude Code · Codex · Cursor · Agent Plugins v1<br/>skills · rules · MCP · hooks · agents · commands ·<br/>LSP · monitors · settings · styles"] subgraph T1["Tier 1 · Static & security (gating)"] direction TB T1a["Manifest checks per format<br/>+ component inventory"] T1b["Dependency classification<br/>provided / referenced / missing / external / unresolved"] T1c["MCP policy · pinning · endpoints<br/>(opt-in DNS and redirect checks)"] T1d["Hook risk · agent, command and skill privileges<br/>LSP, monitor and settings checks"] T1e["Whole-tree scans · bundled-skill quality/lint/version<br/>opt-in CVE audit: Python, npm, containers"] T1f["Static context-cost estimate"] end subgraph T2["Tier 2 · Deduplication (advisory)"] direction TB T2a["A · duplicate refs"] T2b["C-intra · bundled-skill overlap"] T2c["C-inter · skills vs local catalog"] T2d["B · plugin vs other plugins<br/>(optional LLM verdict)"] end subgraph T3["Tier 3 · Live agent evaluation (Harbor)"] direction TB L["Plugin loading<br/>wrapper (default): generated skill + members + rules + MCP<br/>native: claude-code · codex · opencode adapters"] A1["With plugin<br/>load census · hook census"] A2["Without plugin"] A3["Member skills only<br/>(sum of parts)"] G["Graders<br/>security incl. canary exfiltration · execution ·<br/>judges (N/A without a reference)"] S["Plugin signals (advisory)<br/>activations · routing · tool selection · arguments ·<br/>MCP outcomes · order · handoff · conflict"] M["MCP proof (opt-in)<br/>host probe + in-agent calls"] ST["Statistics<br/>paired bootstrap CI · pass@k / pass^k ·<br/>cost per success · token efficiency · context delta"] end R["Reports<br/>JSON · Markdown · HTML · SARIF · CLI<br/>coverage: staged / loaded / exercised<br/>INCOMPLETE / INCONCLUSIVE · plugin BENCHMARK.md"] P --> T1 --> T2 --> T3 --> R L --> A1 A1 --> G A2 --> G A3 --> G G --> S --> ST S --> MWhat each tier supports
agent_plugin.yamland the Claude Code, Agent Plugins v1, Codex and Cursorplugin.jsonformats, selected in that order, with root-bounded, no-follow discovery and each client's field checks. Other manifests found are recorded and their components checked. Opt-inclaude-validatecompares the verdict withclaude plugin validatefor Claude Code plugins (advisory)plugin_manifest_conflicton a name or version mismatchprovided/referenced/missing/external/unresolved, with fail-closed repository identity andvalidate --repo-root. Claude Codedependenciesresolve against the plugin'smarketplace.jsonmissingblocks (HIGHplugin_dependency_missing); refs it cannot check are MEDIUMmcpServersform (inline, path, array, root.mcp.json), read with each client's${VAR}expansionnpx,uvx,pnpm dlx,docker run, ...) through launch wrappers, in MCP servers and command hooks, with a pinning ratiomcp_command_floating_versionfor a moving tag; MEDIUMmcp_unpinned_packageotherwise--dangerously-skip-permissions,bypassPermissions, Codex-a never, auto-approve,LD_PRELOAD, proxy and base-URL redirects, shipped.env)mcp.allowed_private_hostsallowlist. Opt-in--resolve-endpointsadds DNS and oneHEADcheckcurl … | sh, download-then-run), inline secrets, broad auto-approval, HTTP endpoints (hooks.allowed_urls), context injectiontools,allowed-tools,permissionMode)bypassPermissions, orallowed-toolsthat pre-approve any Bash. MEDIUM: wildcards,acceptEdits/auto, subagents that inherit every tool beside a write-capable MCP server. LOW: a subagent's unrestricted Bashpip-audit --no-deps --disable-pip), npm (lockfiles,package.json, MCP runner packages) and container images (MCP and Dockerfiles), with OSV-Scanner,npm audit, Grype or Trivydependency-not-audited; floating versions are INFO; no scanner or an unreadable file is INCOMPLETE--llmverdict). Catalog v2 stores plugin entries; v1 catalogs still load--lift-mode effectiveness|integration|both, with the Integration evidence gate (cross_component,expected_skills)--block-on-agent-eval--plugin-load wrapper|native|auto(defaultwrapper) for the with-plugin arm only: native adapters for claude-code (--plugin-dir), codex and opencode; Hermes (experimental) uses the wrapper. A per-trial load census lists staged components; Claude Code's init event marks themloadedornot_loadednativerefuses components with a permission bypass; a native run with no load census, or whose plugin Claude Code never loaded, is INCOMPLETEhook_census.sh, which records runs, denials and start failures and passes input, output and exit code throughexercised--trial-retries N(orharbor.trial_retriesinevals/config.yml, 0–5): reruns a trial only when it fails before the agent starts its task (environment start timeout, agent setup timeout, or a network failure while installing the agent). A failure during the task is never retried; retries are shown in the run plan and counted in the resultscanary_exfiltration; plugin-attributable when the plugin arm leaks more often than the baseline--probe-mcp): a policy-checked hostinitializeandtools/listfor URL servers, with no host credentials unless a variable is named with--probe-mcp-env, then updated from the agent's own callssubagent_typeor Claude Code'stype), and a successful Claude CodeLSPcall is credited to the plugin LSP server that serves the file's extensionground_truth/expected_behavior) are N/A, not a fabricated 1.0staged,loaded,not_loaded,exercised, ...), headlined as "N components not staged"; explicit INCOMPLETE and INCONCLUSIVE;plugin_provenance.jsonre-read when a report is rebuilt; pluginBENCHMARK.mdcardReviewer notes: behavior changes to be aware of
ground_truthnow gets a NEUTRAL verdict at best, because its Correctness evidence is missing.reward.jsonstays numeric-only for Harbor, and the N/A markers travel in the sidecar.skill_executionandskill_efficiencyas N/A, and every lift compares its two arms case by case on the dimensions both scored. Activation alone no longer earns lift, so Skill Lift values change for skill runs too.--block-on-agent-eval, a Tier 3 FAIL verdict now failsvalidate, and so does a confirmed Skill Lift regression (lift at or below −0.10 with its whole interval below zero). NEUTRAL never does.curl … | shand forcedgit pushas critical.inconclusivewhen the interval crosses a band edge, fewer than 5 cases pair, or per-case coverage is incomplete. The point estimate's band is kept aspoint_verdict.--no-deps --disable-pip, so transitive coverage from requirements files is traded for not executing untrusted build code. Python advisories take their severity from the public OSV record (GitHub severity, then CVSS) rather than defaulting to HIGH.Public adaptations and exclusions
--resolve-endpointsadds DNS and redirect checks, and thedependencyaudit uses its scanners' advisory and registry lookups. Tier 2 catalogs are local files.exercisedfrom the agent'sLSPcalls; other harnesses and wrapper mode do not stage them, and monitors are never staged;listed(found, not confirmed by the harness); Hermes has no native plugin path, and no end-to-end Hermes plugin run has been verified;--probe-mcpcovers URL servers only;env,headersand${user_config.*}values that the with-plugin arm cannot apply (only native Claude Code applies them); such runs are INCOMPLETE;Included pull requests
--trial-retries(results).mainthrough v0.5.0, including the Harbor 0.24.0 upgrade from #83.Verification
uv run pytest -q -n 6ate8b7aeb: 17,893 passed, 29 skipped; CI green (17 checks). One existing timing test,test_streamed_timeout_callback_matches_result_and_contains_descendants, is flaky under heavy xdist load and passes on rerunuv run ruff check .: passedscripts/check_oss_boundary.pyandscripts/ci/check_public_benchmarks.py --require-files tests/golden: passedfern check: 0 errorsA sample live Harbor run on the internal counterpart of this work (MR !280) passed for Claude Code and Codex with native loading (results). Live plugin runs on Harbor 0.24.0 with NVIDIA Build (results):
exercisedfor its MCP server, hooks, command and LSP server.Verification also covers focused regressions per feature (including symlink, escape and oversize cases) and packaging and boundary checks.
Restoration note (from the original description)
This PR replaces #17, which GitHub permanently closed after the default-branch history was consolidated and the original head branch was deleted and recreated. The original discussion and commit history remain available on #17.
🤖 Generated with Claude Code
Added: Integration lift, Bundle lift wording, one run-status source
These 38 commits were first opened as #197 and are now part of this PR (#197 shows as merged).
What this adds
--lift-mode ladderruns four arms per case: no plugin, skills only, loose parts, and the full plugin. "Loose parts" is the same skills, rules, MCP servers, subagents, commands and hooks that Claude Code can load on its own, staged as separate plain pieces with no plugin packaging. So full plugin minus loose parts isolates the plugin's glue. The lift splits into steps that add up exactly per case on one shared set of scores:reporting/run_status.py). JSON, Markdown, HTML, SARIF, the terminal summary, the footer and BENCHMARK.md now take their headline status from one place. Before, a run with failed Tier 1 validators and a partial scanner said INCOMPLETE in JSON, Markdown and HTML but FAIL in the CLI and BENCHMARK.md, and the HTML Tier 1 card said N/A.eval_core/checks.pyandharbor/templates/eval.py. It runs both copies on the same inputs (1,803 commands and 96 paths from real traces) and found two real drifts, both fixed toward the container copy so no reported score changes.tier3 evaluate-plugintakes the same report options asvalidate; a warning when--n-concurrentis lower than the number of arms in ladder mode.Rules for the Integration lift
inconclusive.both).Evidence
Behavior changes to review
overall_status. The docs used to say it readsincompletewhenever a scanner had no evidence. It now follows the documented rule that a real failure outranks missing evidence, andincomplete_scansstill lists the missing scanners. Docs and CHANGELOG are updated.check_error_recoveryandcheck_tool_efficiencyon the host copy now match the container copy (timeouts and connection-refused no longer count as failures there; the host copy no longer returns raw command text inwasted_calls).statistics.jsonandresult.jsonnow carries"lift_ladder": nullwhen the ladder wasn't requested.loose_parts_lift.jsonandintegration_lift.jsonnow compare both arms on the cases both scored, with abasisblock listing what was left out (before, a case with no expected skill made one arm's average cover fewer trials).Open questions for the owners
b4de17d4is an unrelated old bug (the HTML preview note printed<built-in method items of dict object>instead of a count). Keep it here or drop it.${CLAUDE_PLUGIN_ROOT}. Such pieces are listed inplugin_root_in_textbut not counted as a mismatch, because the spec asked for byte-identical text. release-kit has none. Should the loose copies get the root written in?custom_lift.jsonshould be paired too (left alone because custom metric names are user-defined).Not covered
OpenCode native, Hermes and wrapper mode are "not measured" in v1. Nothing has been run on a Kubernetes sandbox backend; the new code has no Docker-only step. A pooled analysis across plugins is a separate paper script, not part of the product.
How to try it
The plugin needs rules, MCP servers, agents, commands or hooks to stage, and at least one
cross_componentcase naming two or more member skills; otherwise the mode falls back tobothoreffectivenessand records why.