Commit Graph
3 Commits
Author SHA1 Message Date
can1357 9d457f73d9 test: migrated test imports to package subpath exports
- Replaced relative `../src` imports with `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-agent-core` subpaths.
2026-06-08 19:03:55 +02:00
roboomp 3b67926ca9 fix(mnemopi): drained pending embeddings before closing CLI/MCP beams
Codex review on #1833 flagged a real race: short-lived owners
(`cmdRemember` via `withMemory`, MCP `handleRemember` via `withBeam`)
schedule the embedding task on `beam.pendingExtractions` then close
the SQLite handle synchronously. By the time `embed()` awaits and
tries to insert, the DB is closed and `runEmbedding` swallows the
error — so `mnemopi store …` / `mnemopi sleep …` and the MCP write
paths silently dropped every `memory_embeddings` row.

- `withMemory` (CLI), `withBeam` (MCP), and `withSharedBeam` (MCP) are
  now async and `await beam.flushExtractions()` before `close()`.
- CLI handlers (`cmdRemember`/`cmdUpdate`/`cmdStats`/`cmdExport`/`cmdImport`/
  `cmdSleep`/`cmdScratchpad`) and MCP handlers (`handleRemember`/
  `handleUpdate`/`handleSleep`/`handleScratchpad*`/`handleExport`/
  `handleImport`/`handleValidate`/`handleSharedRemember`/etc.) return
  `Promise<...>` to thread the new drain through.
- Pinned the contract with a new regression that drives the full
  `cmdRemember` → `withMemory` → close → reopen cycle and asserts
  `memory_embeddings` persisted across the close, plus updated the
  affected sync `expect(cmdX(...)).toBe(0)` tests to await.

Follow-up to #1832.
2026-06-04 09:36:06 +00:00
can1357 68430dee5c chore: renamed mnemosyne package to mnemopi
- Updated package name, directory, and binary from mnemosyne to mnemopi.
- Updated all lockfile references and workspace paths accordingly.
2026-05-31 08:45:12 +02:00