Commit 518a67a
fix: plugin dynamic import path resolution breaks in Docker/container environments (#26)
All dynamic import() calls in strray-codex-injection.js use relative paths
that resolve from process.cwd() instead of the plugin file location. In
Docker/container setups where cwd differs from the plugin directory,
every import() fails silently, causing the entire processor pipeline
(30+ processors) to never load.
Changes:
- Add resolvePluginImport() using import.meta.url + fileURLToPath for
file-relative resolution with Docker-aware fallback paths
- Add findStrrayDistDir() to locate strray-ai dist via fs.existsSync
across multiple candidate paths (standard, Docker /app, backend subdir)
- Fix all 10 dynamic imports: loadFrameworkLogger, loadConfigPaths,
importSystemPromptGenerator, loadStrRayComponents, outcome-tracker,
inference-tuner
- Session-scope globalThis cache using process.pid to prevent
cross-opencode-session ProcessorManager pollution
- Add typeof guards on executePreProcessors/executePostProcessors
with automatic stale cache clearing
- Wrap resolveStateDir() in try/catch with fallback to directory arg
Tested in production Docker deployment with strray-ai 1.15.35.
Co-authored-by: root <root@ns1013594.ip-15-204-142.us>1 parent 7ca44e1 commit 518a67a
1 file changed
+105
-48
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments