Skip to content

feat(plugin): Add Plugin evaluation support across all tiers - #28

Closed
chrisknvidia wants to merge 195 commits into
mainfrom
naren/plugin-evaluation-all-tiers
Closed

chrisknvidia wants to merge 195 commits into
mainfrom
naren/plugin-evaluation-all-tiers

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Aug 1, 2026 •

Copy link
Copy Markdown
Collaborator

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.

Files staged ≠ components loaded ≠ behavior verified. Every plugin report separates what was inventoried, what was staged into a run, what the harness reported as loaded, what was observed in agent traces, and what was not evaluated at all. Missing evidence narrows the claim; it is never silently dropped.

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 --> M
Loading

What each tier supports

Tier Capability Gating
1 Manifests: agent_plugin.yaml and the Claude Code, Agent Plugins v1, Codex and Cursor plugin.json formats, 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-in claude-validate compares the verdict with claude plugin validate for Claude Code plugins (advisory) Blocking on invalid or unsafe input; MEDIUM plugin_manifest_conflict on a name or version mismatch
1 Component inventory: skills, rules, MCP, hooks (frontmatter hooks too), subagents, commands, LSP, output styles, monitors, settings, Codex apps and Agent Plugins extensions, each with a support level and per-component finding counts Missing, escaping, unsafe or invalid declared paths block (HIGH)
1 Dependency classification: provided / referenced / missing / external / unresolved, with fail-closed repository identity and validate --repo-root. Claude Code dependencies resolve against the plugin's marketplace.json Only missing blocks (HIGH plugin_dependency_missing); refs it cannot check are MEDIUM
1 MCP static policy for every mcpServers form (inline, path, array, root .mcp.json), read with each client's ${VAR} expansion CRITICAL and HIGH block; Tier 3 staging re-checks them
1 Pinning of package runners and images (npx, uvx, pnpm dlx, docker run, ...) through launch wrappers, in MCP servers and command hooks, with a pinning ratio HIGH mcp_command_floating_version for a moving tag; MEDIUM mcp_unpinned_package otherwise
1 Bypass flags and overrides in MCP servers, hooks, LSP servers, monitors and settings (--dangerously-skip-permissions, bypassPermissions, Codex -a never, auto-approve, LD_PRELOAD, proxy and base-URL redirects, shipped .env) HIGH or MEDIUM, by type
1 Endpoint policy for metadata, private, loopback and link-local hosts (encoded IPs too), with an mcp.allowed_private_hosts allowlist. Opt-in --resolve-endpoints adds DNS and one HEAD check HIGH (metadata, never allowlisted) or MEDIUM
1 Hook risk per handler, scripts included: remote code (curl … | sh, download-then-run), inline secrets, broad auto-approval, HTTP endpoints (hooks.allowed_urls), context injection CRITICAL to LOW; an unanalyzable script is HIGH
1 Subagent, command and skill privileges (tools, allowed-tools, permissionMode) HIGH: bypassPermissions, or allowed-tools that pre-approve any Bash. MEDIUM: wildcards, acceptEdits/auto, subagents that inherit every tool beside a write-capable MCP server. LOW: a subagent's unrestricted Bash
1 Whole-plugin-tree security, PII, code-risk, secrets, license, hygiene and Unicode scans, plus quality/lint/version on every bundled skill Existing Tier 1 gates
1 Opt-in dependency audit of declared exact pins, installing nothing: Python (pip-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 Trivy Advisory severity. Pins that pip-audit skips or the npm registry lacks are MEDIUM dependency-not-audited; floating versions are INFO; no scanner or an unreadable file is INCOMPLETE
1 Static always-on vs on-demand context-cost estimate, per harness and load mode Report-only
2 Check A (duplicate refs), C-intra (bundled-skill overlap), and the local-catalog checks C-inter (skills vs catalog) and B (plugin vs other plugins, optional --llm verdict). Catalog v2 stores plugin entries; v1 catalogs still load Advisory; unsafe input blocks
3 Three arms: with plugin, without plugin, member skills only. --lift-mode effectiveness|integration|both, with the Integration evidence gate (cross_component, expected_skills) Gates only with --block-on-agent-eval
3 --plugin-load wrapper|native|auto (default wrapper) 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 them loaded or not_loaded Report-only. native refuses components with a permission bypass; a native run with no load census, or whose plugin Claude Code never loaded, is INCOMPLETE
3 Hook census: native command hooks run through hook_census.sh, which records runs, denials and start failures and passes input, output and exit code through Advisory; marks hooks exercised
3 Opt-in --trial-retries N (or harbor.trial_retries in evals/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 results Report-only
3 Canary exfiltration: a random decoy credential (file and env var) in every arm, traced through shell statements, network and MCP tools, URLs, git, and files written outside the workspace Critical canary_exfiltration; plugin-attributable when the plugin arm leaks more often than the baseline
3 Runtime security: credential-store reads and protected-file writes, matched as normalized whole paths, subagent and child-agent calls included Critical scores 0.0
3 MCP proof (opt-in --probe-mcp): a policy-checked host initialize and tools/list for URL servers, with no host credentials unless a variable is named with --probe-mcp-env, then updated from the agent's own calls Advisory
3 Paired case-bootstrap 95% CI on Effectiveness and Integration lift, with a precision flag. pass^k, cost per success, token efficiency, measured first-turn context delta Report-only; Integration becomes INCONCLUSIVE when the CI crosses a ±0.05 band edge, fewer than 5 cases pair, or coverage is incomplete
3 Plugin signals (dataset-driven): activations, routing and tool-selection P/R/F1 with decoys, argument checks, MCP call outcomes by server and tool, order, handoff, conflict probes, activation coverage. Subagent calls are credited whichever key names the agent (subagent_type or Claude Code's type), and a successful Claude Code LSP call is credited to the plugin LSP server that serves the file's extension Advisory, report-only
3 Judges without a reference (ground_truth / expected_behavior) are N/A, not a fabricated 1.0 See reviewer notes
All Reports: plugin sections in JSON, Markdown, HTML, SARIF and the CLI, including plugin loading, hook census, canary and MCP proof. Tier 3 coverage per component (staged, loaded, not_loaded, exercised, ...), headlined as "N components not staged"; explicit INCOMPLETE and INCONCLUSIVE; plugin_provenance.json re-read when a report is rebuilt; plugin BENCHMARK.md card —

Reviewer notes: behavior changes to be aware of

  • N/A judges. Accuracy, goal accuracy and behavior check no longer return 1.0 when the case has no reference. They are excluded from the overall score and from lift, so a run where no case has ground_truth now gets a NEUTRAL verdict at best, because its Correctness evidence is missing. reward.json stays numeric-only for Harbor, and the N/A markers travel in the sidecar.
  • One lift basis, skills included. The arm without the skill or plugin scores skill_execution and skill_efficiency as 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.
  • Tier 3 gate. With --block-on-agent-eval, a Tier 3 FAIL verdict now fails validate, and so does a confirmed Skill Lift regression (lift at or below −0.10 with its whole interval below zero). NEUTRAL never does.
  • Scores can move for skill runs too. Judges see the full body of each file write, within the evidence budget, instead of its first 200 characters. Runtime security checks more credential stores, protected files and subagent calls, and treats curl … | sh and forced git push as critical.
  • New blocking Tier 1 findings for plugins: the CRITICAL and HIGH findings of the manifest, component-path, dependency, MCP, endpoint, bypass-flag, hook-risk and privilege checks above. Tier 3 staging fails closed on the same MCP findings.
  • Bundled skills are gated. Quality, lint and version now run on each bundled skill, so a weak bundled skill can fail a plugin that used to pass.
  • Integration verdict (advisory). It reads the whole interval against the ±0.05 band and is inconclusive when the interval crosses a band edge, fewer than 5 cases pair, or per-case coverage is incomplete. The point estimate's band is kept as point_verdict.
  • The dependency audit no longer installs anything. It audits exact pins with --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

  • Public GitHub/Git references and same-repository offline resolution only. Nothing internal is included: no GitLab, P4, managed execution, private providers or endpoints, credentials, telemetry, provider-registry MCP resolution, or remote vector DB.
  • Tier 1 plugin checks run offline unless you opt in: --resolve-endpoints adds DNS and redirect checks, and the dependency audit uses its scanners' advisory and registry lookups. Tier 2 catalogs are local files.
  • Not yet supported, and reported as such rather than hidden:
    • LSP servers outside native Claude Code, and monitors: native Claude Code stages LSP servers and credits them as exercised from the agent's LSP calls; other harnesses and wrapper mode do not stage them, and monitors are never staged;
    • native-load confirmation outside Claude Code: Codex and OpenCode components stay listed (found, not confirmed by the harness); Hermes has no native plugin path, and no end-to-end Hermes plugin run has been verified;
    • process-level evidence: runtime security and the canary read the agent's tool calls and the files they wrote, so a hook or MCP server process acting on its own is not observed;
    • an equivalent of internal's provider-registry MCP proof: provider-only MCP servers are never resolved or probed (the run is INCOMPLETE), and --probe-mcp covers URL servers only;
    • MCP env, headers and ${user_config.*} values that the with-plugin arm cannot apply (only native Claude Code applies them); such runs are INCOMPLETE;
    • Codex apps and Agent Plugins extensions, which are inventoried only.

Included pull requests

  • #171 (Stage C): native plugin loading, the Codex, Cursor and Agent Plugins v1 manifests, static risk checks for hooks, privileges, LSP, monitors, settings and output styles, runtime evidence (load and hook census, canary), npm and container CVE audits, and the MCP proof.
  • #180 and #181: fixes from two rounds of code review of this PR.
  • Fixes from live validation on real plugins and on a fixture plugin with every component type: MCP, hook, subagent, command and LSP staging, detection and reporting, NVIDIA Build bridge handling of long MCP tool names and non-text tool results, and --trial-retries (results).
  • The branch tracks main through v0.5.0, including the Harbor 0.24.0 upgrade from #83.

Verification

  • uv run pytest -q -n 6 at e8b7aeb: 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 rerun
  • uv run ruff check .: passed
  • scripts/check_oss_boundary.py and scripts/ci/check_public_benchmarks.py --require-files tests/golden: passed
  • fern check: 0 errors

A 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):

  • Two real plugins loaded natively in Claude Code, Codex and OpenCode, and their bundled or referenced skills were exercised; Claude Code ran the plugin's hooks.
  • A fixture plugin with one of each component type, run natively in Claude Code, reached exercised for its MCP server, hooks, command and LSP server.
  • Some runs read INCOMPLETE because NVIDIA Build returned 429 to an agent or a judge; those trials are left unscored rather than given a score.

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

  1. A real Integration lift. --lift-mode ladder runs 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:
    • Skill lift = skills only minus no plugin
    • Capability lift = loose parts minus skills only
    • Integration lift = full plugin minus loose parts
    • Plugin lift = full plugin minus no plugin
    • Bundle lift (full plugin minus skills only) is still reported next to them.
  2. Bundle lift wording. Today's plugin-minus-member-skills number is now labelled Bundle lift in every report, with one sentence saying it includes the rules, MCP servers and wrapper. It is also split by case type (cross-component cases versus the rest). JSON keys are unchanged. There is a "Known limitations and planned work" section in the docs.
  3. One run-status module (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.
  4. A parity test between eval_core/checks.py and harbor/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.
  5. Small fixes: per-metric lift files compare both arms on the same cases; tier3 evaluate-plugin takes the same report options as validate; a warning when --n-concurrent is lower than the number of arms in ladder mode.

Rules for the Integration lift

  • Native Claude Code only in v1. A wrapper-mode comparison is labelled "Wrapper effect" and never gets an Integration verdict. Other agents show "not measured" with the reason (Codex already loads a plugin as loose parts, so there is no glue to measure).
  • Capability must be identical across arms: skills, rules, agents, commands and hook scripts are byte-identical, and MCP and hook config differ only by the plugin-root variable. Content hashes are recorded per arm, and if any differ the verdict is inconclusive.
  • Only Claude Code's own startup report marks a part loaded. A slow MCP server reported "pending" counts as loaded only with a successful tool call. A case that fails to load in any arm is dropped from all arms, with the reason recorded.
  • Advisory and report-only, as before. The verdict uses the existing ±0.05 bands, needs at least 5 cross-component pairs, and it never changes a score, verdict or exit code.
  • Costs one more run per case (about a third more trials than both).

Evidence

  • Real pilot (release-kit, native Claude Code, Haiku 4.5, 16 cases x 2 attempts x 4 arms, 128 of 128 trials scored): Skill +0.0446, Capability +0.4481, Plugin +0.4923; Integration on the 10 cross-component cases is −0.0006 [−0.0062, +0.0048], "cosmetic glue". An independent recomputation from the raw per-trial files matched 354 of 354 numbers in the reports. This is one plugin, one model and one Claude Code version; 7 of 10 cross-component cases score 1.00 in both arms, so it is not a general claim about plugin glue.
  • Tests were written first and shown failing, then passing, for each piece. Full suite on this branch: 18,962 passed, 1 failed (a macOS socket-path-length limit that passes alone), 29 skipped. ruff check and format are clean on the 64 Python files touched; the verifier files compile on Python 3.9 and 3.11; local gitleaks found nothing in the 34 new commits. All commits are signed off.
  • Each part had an independent review pass. Findings and what happened to each are in the commit messages.

Behavior changes to review

  • JSON overall_status. The docs used to say it reads incomplete whenever a scanner had no evidence. It now follows the documented rule that a real failure outranks missing evidence, and incomplete_scans still lists the missing scanners. Docs and CHANGELOG are updated.
  • A missing scanner in an advisory tier no longer changes the headline; the reports name that tier instead.
  • BENCHMARK.md: an advisory Tier 3 FAIL together with missing evidence now says FAIL (it said INCOMPLETE), matching the partial-run path.
  • Some terminal wording changed, for example "Required validations passed (Tier 2 FAIL is advisory)".
  • check_error_recovery and check_tool_efficiency on 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 in wasted_calls).
  • Every statistics.json and result.json now carries "lift_ladder": null when the ladder wasn't requested.
  • loose_parts_lift.json and integration_lift.json now compare both arms on the cases both scored, with a basis block 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

  • b4de17d4 is 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 Code writes the real plugin root into plugin skill, agent and command text, while the loose copy keeps ${CLAUDE_PLUGIN_ROOT}. Such pieces are listed in plugin_root_in_text but 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?
  • Whether the per-metric tables should show paired values, and whether custom_lift.json should 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

skillevaluator tier3 evaluate-plugin ./my-plugin -a claude-code --plugin-load native --lift-mode ladder --n-attempts 2 -r html,json,markdown

The plugin needs rules, MCP servers, agents, commands or hooks to stage, and at least one cross_component case naming two or more member skills; otherwise the mode falls back to both or effectiveness and records why.

Restores and rebases the plugin evaluation work from PR #17 onto the rewritten main history.

Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995
rng1995 force-pushed the naren/plugin-evaluation-all-tiers branch from 3a51f76 to a4a5e63 Compare August 4, 2026 19:14
chrisknvidia and others added 13 commits August 4, 2026 12:18
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]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
rng1995 previously approved these changes Aug 5, 2026

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after the EOF diff-hygiene issue was fixed in 3965061, the review thread was resolved, and the complete GitHub check matrix passed.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/skillevaluator/tier3/plugin_eval.py Resolved
Comment thread src/skillevaluator/tier3/plugin_eval.py Resolved
…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]>

# 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
rng1995
rng1995 previously approved these changes Aug 12, 2026

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
* 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]>
@rng1995 rng1995 closed this Nov 8, 2026
rng1995 added a commit that referenced this pull request Nov 9, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants