Files
ruflo/scripts
rUvandClaude 838c695603 fix: Add automatic AgentDB import extension patch
Fixes ERR_MODULE_NOT_FOUND error when using npx claude-flow@alpha

## Problem

AgentDB v1.3.9 has missing .js extensions in controller imports:
```javascript
// node_modules/agentdb/dist/controllers/index.js
export { ReflexionMemory } from './ReflexionMemory';  // ❌ Missing .js
```

This causes MODULE_NOT_FOUND errors in ESM environments, especially
when using npx which gets fresh installs without local patches.

## Solution

Added automatic postinstall patch that fixes AgentDB imports:

1. **patches/agentdb-fix-imports.patch** - Patch definition
2. **scripts/fix-agentdb-imports.sh** - Auto-apply script
3. **package.json** - Updated postinstall to run fix

The fix is applied automatically on:
- npm install
- npm update
- npx claude-flow@alpha (fresh installs)

## Changes

- Added patches/agentdb-fix-imports.patch
- Added scripts/fix-agentdb-imports.sh (executable)
- Updated package.json postinstall script

## Testing

✅ Verified locally with npx claude-flow@alpha memory list
✅ Import errors resolved
✅ All memory commands working

## Note

This is a temporary workaround until agentdb@1.3.9 is fixed upstream.
The patch adds .js extensions to ESM imports:
- ReflexionMemory.js
- SkillLibrary.js
- EmbeddingService.js

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 19:30:39 +00:00
..
2025-06-11 04:14:28 +00:00
2025-06-17 18:32:39 +00:00
2025-06-11 04:14:28 +00:00
2025-06-11 04:14:28 +00:00
2025-06-10 23:33:22 +00:00
2025-06-10 23:33:22 +00:00