refactor: drop the legacy memory engine from core, the server and the build (P1.5)

- @waggle/core no longer re-exports @waggle/hive-mind-core and no longer
  depends on it.
- The server no longer opens personal.mind or a cache of workspace minds;
  the legacy files are only read by the one-time copies of legacy data.
  releaseWorkspace closes the workspace's sessions and detaches it from the
  shared orchestrator.
- WorkspaceManager stops creating an empty workspace.mind.
- memory-center-legacy.ts had no callers left and is removed.
- build:packages no longer builds hive-mind-core and wiki-compiler; the
  sidecar aliases the memory packages to source instead.
- mem0ai stays external in the sidecar and launcher bundles: it imports a
  client for every provider it supports on demand, and bundling it failed on
  the optional peers Waggle does not install. The launcher declares mem0ai
  and no longer needs sqlite-vec.
This commit is contained in:
shumeiko.it
2026-10-24 13:34:09 +02:00
parent bde961abcf
commit e435e7da94
12 changed files with 252 additions and 190 deletions

View File

@@ -131,8 +131,8 @@ function isContained(root: string, candidate: string): boolean {
* WorkspaceManager manages workspace CRUD, groups, and directory structure.
* Each workspace lives under {baseDir}/workspaces/{id}/ with:
* - workspace.json (config)
* - workspace.mind (SQLite .mind file, created empty)
* - sessions/ (JSONL session logs)
* Workspace memory lives in the memory store, not in this directory.
*/
export class WorkspaceManager {
private readonly workspacesDir: string;
@@ -217,9 +217,6 @@ export class WorkspaceManager {
}
fs.mkdirSync(path.join(canonicalWorkspace, 'sessions'));
// Touch workspace.mind — MindDB will init schema when first opened
fs.writeFileSync(path.join(canonicalWorkspace, 'workspace.mind'), '', { flag: 'wx' });
const config: WorkspaceConfig = {
id,
name: options.name,
@@ -355,7 +352,8 @@ export class WorkspaceManager {
}
/**
* Get the path to a workspace's .mind file.
* Get the path to a workspace's legacy .mind file. Only the one-time copy of
* legacy data reads it; new workspaces do not have one.
*/
getMindPath(id: string): string {
this.assertWorkspaceId(id);