fix: register retry + resetRegistration + isOwnedByAgent fail-closed (#448)#15
Closed
jlin53882 wants to merge 5 commits intofix/issue-448-v2from
Closed
fix: register retry + resetRegistration + isOwnedByAgent fail-closed (#448)#15jlin53882 wants to merge 5 commits intofix/issue-448-v2from
jlin53882 wants to merge 5 commits intofix/issue-448-v2from
Conversation
Add 'skills' field to openclaw.plugin.json to enable OpenClaw automatically discover skills in plugin directory - openclaw.plugin.json: add "skills": ["./skills"] configuration - skills/lesson/SKILL.md: add metadata config dependency declaration
…required (OpenClaw 2026.4.5 compat) (CortexReach#541) * fix: remove duplicate memory_compact tool registration in index.ts memory_compact was registered twice when enableManagementTools is true: once via registerAllMemoryTools() → registerMemoryCompactTool() in src/tools.ts, and again in a standalone block in index.ts (lines 2116–2202). OpenClaw 2026.4.5 now throws on duplicate tool name registration, causing plugin initialization failure. The standalone block in index.ts is the stale duplicate — the canonical implementation lives in src/tools.ts and is already wired through registerAllMemoryTools(). * fix: remove redundant required: ["embedding"] from configSchema root OpenClaw 2026.4.5 changed how config values are passed to the AJV validator during framework-level validation. The root-level required: ["embedding"] constraint fails because the config object reaching the validator may not have the embedding key at the time of framework validation (timing/default-handling change). This constraint was always redundant: the plugin's own parsePluginConfig() already validates embedding.apiKey presence at load time, and embedding.required: ["apiKey"] in the sub-schema still catches misconfiguration. --------- Co-authored-by: Max Eschbach <maxeschbach@macbookair.local>
* fix: parse autoRecallTimeoutMs in parsePluginConfig with 3000ms default * fix: raise parsePluginConfig autoRecallTimeoutMs default from 3000 to 5000ms
…ortexReach#448) 修復 PR CortexReach#522 的 3 個問題: 1. Bug 1: register() 失敗後同一 API instance 可重試 - _registeredApis 從 WeakSet 改為 Map - try-catch 包住初始化,.set(api, true) 在成功後才執行 - catch block 不呼叫 .set(),允許失敗後重試 2. Bug 2: resetRegistration() 真正清除狀態 - WeakSet 無法 clear,改用 Map 後可呼叫 .clear() - 新增 _getRegisteredApisForTest() 供測試用 3. Bug 3: isOwnedByAgent malformed itemKind fail-closed - type=memory-reflection-item 時,只有 invariant/derived 合法 - 非法的 itemKind(如 weird-kind、空字串、數字等)→ return false - 修復 main derived 會洩漏給 sub-agent 的問題 新增測試: - test/isOwnedByAgent.test.mjs (19 tests) - test/register-reset.test.mjs (17 tests)
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.
fix: register retry + resetRegistration + isOwnedByAgent fail-closed (CortexReach#448)
修復 PR CortexReach#522 的 3 個問題:
Bug 1: register() 失敗後同一 API instance 可重試
Bug 2: resetRegistration() 真正清除狀態
Bug 3: isOwnedByAgent malformed itemKind fail-closed
新增測試: