Skip to content

fix: declare strict tool contracts and hook entitlements for sandbox … - #5

Open
ripper2hl wants to merge 1 commit into
redis-developer:mainfrom
ripper2hl:fix/strict-tool-contracts-and-hook-entitlements
Open

fix: declare strict tool contracts and hook entitlements for sandbox …#5
ripper2hl wants to merge 1 commit into
redis-developer:mainfrom
ripper2hl:fix/strict-tool-contracts-and-hook-entitlements

Conversation

@ripper2hl

Copy link
Copy Markdown

…compatibility

The plugin shipped broken in restrictive OpenClaw environments due to two omissions in its metadata:

  1. Missing contracts.tools in openclaw.plugin.json — the OpenClaw sandbox requires an explicit array of tool names. Without it, the gateway silences the plugin entirely ("plugin must declare contracts.tools"). Wildcards like ["*"] are also rejected by the core validator.

  2. Missing hooks schema in configSchema — the agent_end hook for auto-capture requires allowConversationAccess in the user config, but the schema had additionalProperties: false without declaring hooks, so the validator rejected any config that included it.

Changes:

  • Add contracts.tools to openclaw.plugin.json with explicit tool signatures
  • Add hooks property to configSchema (JSON + TypeScript config parser)
  • Add unit tests for hooks config parsing (happy path + unknown key rejection)
  • Add troubleshooting entries to README for both issues

…compatibility

The plugin shipped broken in restrictive OpenClaw environments due to two
omissions in its metadata:

1. Missing contracts.tools in openclaw.plugin.json — the OpenClaw sandbox
   requires an explicit array of tool names. Without it, the gateway silences
   the plugin entirely ("plugin must declare contracts.tools"). Wildcards
   like ["*"] are also rejected by the core validator.

2. Missing hooks schema in configSchema — the agent_end hook for auto-capture
   requires allowConversationAccess in the user config, but the schema had
   additionalProperties: false without declaring hooks, so the validator
   rejected any config that included it.

Changes:
- Add contracts.tools to openclaw.plugin.json with explicit tool signatures
- Add hooks property to configSchema (JSON + TypeScript config parser)
- Add unit tests for hooks config parsing (happy path + unknown key rejection)
- Add troubleshooting entries to README for both issues
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.

1 participant