fix: 補齊 contracts.tools 聲明以解決插件啟動錯誤#749
Open
samson1357924 wants to merge 1 commit intoCortexReach:masterfrom
Open
fix: 補齊 contracts.tools 聲明以解決插件啟動錯誤#749samson1357924 wants to merge 1 commit intoCortexReach:masterfrom
samson1357924 wants to merge 1 commit intoCortexReach:masterfrom
Conversation
- 新增 contracts.tools 宣告所有 14 個工具 - 新增 toolMetadata 將管理工具標記為 optional: true - 修復啟動錯誤:'plugin must declare contracts.tools before registering agent tools' - 參考:OpenClaw Plugin Building Guide
Author
|
@CortexReach 您好! 👋 這是一個修復插件啟動錯誤的 PR。 問題描述: 修復內容:
驗證結果: 希望這個修復能幫助改善插件!如果有任何需要修改或調整的地方,非常歡迎隨時告訴我。 感謝您開發這麼棒的記憶體插件!🙏 |
Contributor
|
@samson1357924 This PR has been replaced by PR #742 , and the content is cleaner, so it is recommended to close this PR. |
Contributor
|
@rwmjhb It is recommended to close this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題描述
啟動 OpenClaw 時出現以下錯誤:
根本原因
插件代碼 (
index.ts) 註冊了 14 個工具,但openclaw.plugin.json中缺少contracts.tools聲明。根據 OpenClaw 安全機制,插件必須先在 manifest 中宣告工具清單,才能註冊這些工具。
修復方案
在
openclaw.plugin.json中新增以下內容(插入在"kind": "memory",之後):contracts.tools 聲明
toolMetadata 聲明
驗證結果
enableManagementTools配置控制相關文檔