Skip to content

feat(plugins): add manifest activation and setup descriptors - #64780

Merged
vincentkoc merged 2 commits into
mainfrom
feat/ocplugins-architecture
Apr 11, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
feat/ocplugins-architecture

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • Problem: phase 1 of the plugin-architecture plan needed manifest-only descriptor seams for future activation/setup work, but openclaw.plugin.json could not express them yet.
  • Why it matters: setup/control-plane flows should be able to inspect cheap plugin metadata without widening runtime imports or inventing ad hoc side channels later.
  • What changed: added optional activation and setup manifest blocks, normalized them in manifest loading, exposed them in manifest-registry records, documented them, and added tests for normalization plus registry preservation.
  • What did NOT change (scope boundary): no activation planner, no runtime loading changes, no setup-api migration, and no plugin execution-path behavior changes yet.
  • AI-assisted: yes.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: N/A
  • Missing detection / guardrail: N/A
  • Contributing context (if known): N/A

Regression Test Plan (if applicable)

N/A

User-visible / Behavior Changes

Plugin authors can now declare optional manifest-only activation and setup descriptors in openclaw.plugin.json. No runtime activation behavior changed yet.

Diagram (if applicable)

Before:
manifest -> identity/config/auth/contracts metadata only

After:
manifest -> identity/config/auth/contracts metadata + activation/setup descriptors

Security Impact (required)

  • New permissions/capabilities? (Yes/No): No
  • Secrets/tokens handling changed? (Yes/No): No
  • New/changed network calls? (Yes/No): No
  • Command/tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 / pnpm
  • Model/provider: N/A
  • Integration/channel (if any): plugin manifest + registry surfaces
  • Relevant config (redacted): default repo config

Steps

  1. Add optional activation and setup blocks to openclaw.plugin.json.
  2. Load the manifest directly and through loadPluginManifestRegistry.
  3. Run focused plugin-manifest tests and a full build.

Expected

  • Manifest loading normalizes the new blocks.
  • Registry records preserve the normalized metadata.
  • Build stays green.

Actual

  • Works as expected.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Focused verification:

  • pnpm test:serial src/plugins/manifest.json5-tolerance.test.ts src/plugins/manifest-registry.test.ts
  • pnpm build
  • pnpm lint -- src/plugins/manifest.ts src/plugins/manifest-registry.ts src/plugins/manifest.json5-tolerance.test.ts src/plugins/manifest-registry.test.ts

Additional note:

  • pnpm check still fails on unrelated stale generated drift in apps/macos/Sources/OpenClaw/HostEnvSecurityPolicy.generated.swift on this fresh branch off main.

Human Verification (required)

  • Verified scenarios: manifest parsing of the new descriptor blocks, registry preservation of the new metadata, docs alignment, targeted lint, and full build.
  • Edge cases checked: invalid/empty descriptor entries are dropped during normalization; requiresRuntime: false is preserved explicitly.
  • What you did not verify: no runtime activation planner exists yet, so there was no execution-path behavior to verify beyond manifest/registry surfaces.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: docs or downstream callers could overread these fields as active runtime behavior.
    • Mitigation: docs and architecture notes explicitly mark them as metadata-only, and runtime loading behavior is unchanged in this phase.

@vincentkoc vincentkoc self-assigned this Apr 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M maintainer Maintainer-authored PR labels Apr 11, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review April 11, 2026 11:32
@greptile-apps

greptile-apps Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds optional activation and setup descriptor blocks to openclaw.plugin.json, normalizes them during manifest loading, and exposes them in PluginManifestRecord. The changes are metadata-only — no activation planner or runtime loading paths are changed yet. New normalization functions follow existing patterns (invalid/empty entries dropped, closed enum filtering for onCapabilities), types are well-documented, and both unit and integration tests are included. The doc additions correctly frame these as control-plane metadata that does not replace runtime registration.

Confidence Score: 5/5

Safe to merge — purely additive metadata fields with no runtime behavior changes.

All new fields are optional, backward-compatible, and isolated to the manifest/registry data layer. Normalization logic is defensive and consistent with existing helpers. Tests cover normalization edge cases (empty strings, invalid capability values, explicit requiresRuntime: false) and registry round-trip preservation. No P0 or P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "Merge branch 'main' into feat/ocplugins-..." | Re-trigger Greptile

@vincentkoc
vincentkoc merged commit 79c3dbe into main Apr 11, 2026
9 checks passed
@vincentkoc
vincentkoc deleted the feat/ocplugins-architecture branch April 11, 2026 11:36
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant