mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 06:36:49 +09:00
Fixes 5 related bugs reported in #2281–#2285, all in the SessionStart
auto-memory pipeline.
- #2281 (embeddings.ts): `ruflo embeddings init` defaulted to the full
HF model name `Xenova/all-MiniLM-L6-v2`, but the embedder's
MODEL_REGISTRY keys are short names (`all-MiniLM-L6-v2`). The `/`
also failed VALID_MODEL_ID_PATTERN. Switched default + example to
the registry-style short form.
- #2282 (auto-memory-bridge.ts): `resolveAutoMemoryDir` only replaced
`/` with `-`, but Claude Code normalizes `_` to `-` too. Any project
path with an underscore (e.g. `RX_ERP`) produced a mismatched
project key and the bridge looked at a non-existent directory.
- #2283 (auto-memory-bridge.ts): `parseMarkdownEntries` only split on
`## ` headings. Claude Code's auto-memory format is YAML frontmatter
+ free-text body with no sub-headings, so every real memory file
parsed to zero entries. Now: strip frontmatter → split on `## ` →
fall back to single untitled entry per file. Frontmatter `name`,
`description`, `type`, `originSessionId` flow into entry metadata.
- #2284 (auto-memory-hook.mjs): the hook hardcoded
`workingDir: PROJECT_ROOT` in both doImport and doSync, where
PROJECT_ROOT is the plugin clone path. The bridge then computed
its memory directory from the plugin path, not the user's project.
Now uses `process.env.CLAUDE_FLOW_CWD || process.cwd()`.
- #2285 (auto-memory-hook.mjs): the plugin marketplace ships
`v3/@claude-flow/*` source-only (no `dist/`), so the existing
4-strategy lookup never found the bundled `@claude-flow/memory`
package when `ruflo` is installed via `npm i -g`. Added a new
`resolveBundledFile()` helper with a global-npm-prefix fallback
that checks the `ruflo`, `claude-flow`, and `@claude-flow/cli`
wrappers in both Unix and Windows global layouts. Applied to all
4 PROJECT_ROOT-anchored package lookups (memory pkg, memory-
initializer, intelligence module).
Tests: 77/78 pass in @claude-flow/memory. The one failure is a
pre-existing Windows-only `path.join` assertion from commit
01efa7e0c8 (2026-02-08), unrelated to this cluster.