openclaw - 💡(How to fix) Fix RFC: allowConversationAccess as plugin manifest field (replaces 2 schema patches) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#71428Fetched 2026-04-26 05:12:49
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1

Fix Action

Fix / Workaround

The PRoblem: the gateway's config schema doesn't know about the field unless explicitly extended. Smarter-Claw maintains TWO patches just to make this opt-in possible:

  • installer/patches/core/schema-allow-conversation-access.diff (~12 LOC, JSON schema)
  • installer/patches/core/zod-schema-allow-conversation-access.diff (~12 LOC, Zod schema)

Both patches add the same field declaration in two parallel locations — a recurring pattern that should be obviated.

Code Example

{
  "id": "smarter-claw",
  "name": "Smarter Claw",
  "permissions": {
    "conversationAccess": true
  }
}

---

// src/plugins/registry.ts (or similar)
function isConversationAccessAllowed(plugin: PluginManifest, config: PluginEntryConfig): boolean {
  if (config?.hooks?.allowConversationAccess === true) return true; // existing path
  if (plugin.permissions?.conversationAccess === true) return true; // NEW
  return false;
}
RAW_BUFFERClick to expand / collapse

Problem statement

The allowConversationAccess flag is set in ~/.openclaw/openclaw.json per-plugin under plugins.entries.<id>.hooks.allowConversationAccess: true. The flag is gated by config schema validation; non-bundled plugins must explicitly opt in or the gateway rejects their agent_end typed-hook subscriptions.

The PRoblem: the gateway's config schema doesn't know about the field unless explicitly extended. Smarter-Claw maintains TWO patches just to make this opt-in possible:

  • installer/patches/core/schema-allow-conversation-access.diff (~12 LOC, JSON schema)
  • installer/patches/core/zod-schema-allow-conversation-access.diff (~12 LOC, Zod schema)

Both patches add the same field declaration in two parallel locations — a recurring pattern that should be obviated.

Proposed change

Make allowConversationAccess a declared field in the plugin manifest (openclaw.plugin.json) instead of in the host config:

{
  "id": "smarter-claw",
  "name": "Smarter Claw",
  "permissions": {
    "conversationAccess": true
  }
}

The gateway reads the manifest at plugin load. If permissions.conversationAccess is true AND the plugin requests agent_end (or other conversation-access-gated hook), it's allowed. No host config flag needed; no schema patches needed.

For backward compatibility, the existing config flag continues to work (and overrides manifest if both present).

Implementation sketch

// src/plugins/registry.ts (or similar)
function isConversationAccessAllowed(plugin: PluginManifest, config: PluginEntryConfig): boolean {
  if (config?.hooks?.allowConversationAccess === true) return true; // existing path
  if (plugin.permissions?.conversationAccess === true) return true; // NEW
  return false;
}

Backward compatibility

Fully additive. Plugins that already set the config flag continue to work. New plugins can declare in manifest instead.

What this saves Smarter-Claw

  • Delete installer/patches/core/schema-allow-conversation-access.diff
  • Delete installer/patches/core/zod-schema-allow-conversation-access.diff
  • Move permission declaration to where it belongs (the plugin's own manifest)

Why this matters beyond Smarter-Claw

This pattern recurs for any future capability gates. Currently each gate requires a parallel pair of patches (Zod + JSON schema). Manifest-declared permissions scale linearly without patch overhead — and put the permission disclosure in the plugin developer's own file (where security review can find it) rather than in the operator's config (where it's invisible).

Tests proposed

  • Plugin with permissions.conversationAccess: true in manifest can subscribe to agent_end without any config flag
  • Plugin without the manifest field AND no config flag → existing rejection behavior
  • Plugin with both → manifest value used (fallback to config if missing)

Cross-link

Smarter-Claw RFC series:

  • openclaw/openclaw#71260 (mergeSessionEntryWithPolicy)
  • openclaw/openclaw#71426 (sessions.patch extension hook)
  • openclaw/openclaw#71427 (tool-event subscription)

extent analysis

TL;DR

Move the allowConversationAccess flag from the host config to the plugin manifest to simplify permission management and eliminate the need for schema patches.

Guidance

  • Update the plugin manifest (openclaw.plugin.json) to include a permissions section with a conversationAccess field, as shown in the proposed change.
  • Modify the isConversationAccessAllowed function in src/plugins/registry.ts to check the plugin manifest for the conversationAccess permission, in addition to the existing config flag check.
  • Test the new behavior with plugins that have the conversationAccess field in their manifest, as well as those that do not, to ensure backward compatibility and correct permission enforcement.
  • Remove the existing schema patches (schema-allow-conversation-access.diff and zod-schema-allow-conversation-access.diff) once the new manifest-based permission system is implemented.

Example

function isConversationAccessAllowed(plugin: PluginManifest, config: PluginEntryConfig): boolean {
  if (config?.hooks?.allowConversationAccess === true) return true; // existing path
  if (plugin.permissions?.conversationAccess === true) return true; // NEW
  return false;
}

Notes

This change assumes that the plugin manifest is read and processed by the gateway at plugin load time. If this is not the case, additional modifications may be necessary to support the new permission system.

Recommendation

Apply the proposed workaround by moving the allowConversationAccess flag to the plugin manifest, as this simplifies permission management and eliminates the need for schema patches, making it easier to add future capability gates without introducing additional complexity.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING