← Back to PRs

#22733: feat(plugin): add runner-extensions extension

by cintia09 open 2026-02-21 15:50 View on GitHub →
size: M
Adds `@openclaw/runner-extensions` — dynamic pi-extension loader for the embedded agent runner. **What it does:** - Resolves extension paths dynamically (`.ts` → `.js` with jiti fallback) - Builds memory-context extension path lists for recall and archive - Periodically probes fallback embeddings to swap in better providers when they recover - Provides `MemoryContextAgentConfig` type for agent defaults Disabled by default — set `enabled: true` in plugin config to activate. <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds `@openclaw/runner-extensions`, a new plugin providing dynamic pi-extension loading infrastructure for the embedded agent runner. The plugin extracts extension path resolution, memory-context wiring, and embedding upgrade probe logic into a reusable package, disabled by default. **Key issues found:** - Test import path is incorrect (`../src/extension-loader.js` should be `../extension-loader.js`) - Missing exports in `index.ts` for `shouldProbeEmbeddingUpgrade` and `MemoryContextCacheEntry` that are documented in README **Implementation notes:** - Properly follows plugin dependency guidelines (`workspace:*` in devDependencies only) - Good test coverage for `shouldProbeEmbeddingUpgrade` function with boundary cases - Extension path resolution includes sensible fallback from `.js` to `.ts` for jiti compatibility <h3>Confidence Score: 3/5</h3> - This PR has two critical bugs that will prevent the code from working correctly - Score reflects two definite bugs: broken test import path and missing public API exports. The incorrect import path will cause test failures, and the missing exports mean consumers cannot use functions documented in the README. Both must be fixed before merge. - Pay close attention to `index.ts` (missing exports) and `src/__tests__/extension-loader.test.ts` (incorrect import path) <sub>Last reviewed commit: 7d407a4</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs