mnemosyne-core 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +198 -28
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +197 -28
- package/dist/cli/index.mjs.map +1 -1
- package/dist/dashboard/index.html +9401 -0
- package/dist/index.js +105 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +104 -25
- package/dist/index.mjs.map +1 -1
- package/dist/mcp/index.js +19 -2
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/index.mjs +26 -2
- package/dist/mcp/index.mjs.map +1 -1
- package/dist/server/api.js +66 -13
- package/dist/server/api.js.map +1 -1
- package/dist/server/api.mjs +72 -13
- package/dist/server/api.mjs.map +1 -1
- package/dist/server/index.js +80 -23
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +79 -23
- package/dist/server/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/cli/index.mjs
CHANGED
|
@@ -3554,9 +3554,26 @@ function loadConfig() {
|
|
|
3554
3554
|
return defaultConfig();
|
|
3555
3555
|
}
|
|
3556
3556
|
}
|
|
3557
|
+
function getVersion() {
|
|
3558
|
+
try {
|
|
3559
|
+
const { readFileSync: readFileSync7 } = __require("fs");
|
|
3560
|
+
const { resolve: resolve13 } = __require("path");
|
|
3561
|
+
const pkg = JSON.parse(readFileSync7(resolve13(__dirname, "../package.json"), "utf-8"));
|
|
3562
|
+
return pkg.version;
|
|
3563
|
+
} catch {
|
|
3564
|
+
try {
|
|
3565
|
+
const { readFileSync: readFileSync7 } = __require("fs");
|
|
3566
|
+
const { resolve: resolve13 } = __require("path");
|
|
3567
|
+
const pkg = JSON.parse(readFileSync7(resolve13(process.cwd(), "package.json"), "utf-8"));
|
|
3568
|
+
return pkg.version;
|
|
3569
|
+
} catch {
|
|
3570
|
+
return "2.0.3";
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3557
3574
|
function defaultConfig() {
|
|
3558
3575
|
return {
|
|
3559
|
-
server: { port: 7321, host: "localhost", version:
|
|
3576
|
+
server: { port: 7321, host: "localhost", version: getVersion() },
|
|
3560
3577
|
database: { path: "data/nexus.db", wal_mode: true, vec_extension_path: "data/vec0" },
|
|
3561
3578
|
storage: { files_dir: "data/files", max_file_size_mb: 50, backups_dir: "data/backups", backup_interval_hours: 24, max_backups: 7 },
|
|
3562
3579
|
limits: { max_atoms_per_project: 1e4, rate_limit_requests: 100, rate_limit_window_ms: 6e4 },
|
|
@@ -3579,11 +3596,20 @@ function mergeDeep(target, source) {
|
|
|
3579
3596
|
}
|
|
3580
3597
|
return output;
|
|
3581
3598
|
}
|
|
3582
|
-
|
|
3599
|
+
function getConfig() {
|
|
3600
|
+
if (!_config) _config = loadConfig();
|
|
3601
|
+
return _config;
|
|
3602
|
+
}
|
|
3603
|
+
var _config, CONFIG;
|
|
3583
3604
|
var init_config = __esm({
|
|
3584
3605
|
"src/config.ts"() {
|
|
3585
3606
|
"use strict";
|
|
3586
|
-
|
|
3607
|
+
_config = null;
|
|
3608
|
+
CONFIG = new Proxy({}, {
|
|
3609
|
+
get(_, prop) {
|
|
3610
|
+
return getConfig()[prop];
|
|
3611
|
+
}
|
|
3612
|
+
});
|
|
3587
3613
|
}
|
|
3588
3614
|
});
|
|
3589
3615
|
|
|
@@ -3668,11 +3694,14 @@ var init_embedder = __esm({
|
|
|
3668
3694
|
import { createHash } from "crypto";
|
|
3669
3695
|
import { mkdirSync, existsSync as existsSync2, writeFileSync, readFileSync as readFileSync2 } from "fs";
|
|
3670
3696
|
import { resolve as resolve2, dirname } from "path";
|
|
3697
|
+
function getFilesDir() {
|
|
3698
|
+
return resolve2(process.cwd(), CONFIG.storage.files_dir);
|
|
3699
|
+
}
|
|
3671
3700
|
function ensureDir(path) {
|
|
3672
3701
|
if (!existsSync2(path)) mkdirSync(path, { recursive: true });
|
|
3673
3702
|
}
|
|
3674
3703
|
function hashPath(hash) {
|
|
3675
|
-
return resolve2(
|
|
3704
|
+
return resolve2(getFilesDir(), hash.slice(0, 2), hash.slice(2));
|
|
3676
3705
|
}
|
|
3677
3706
|
function computeHash(buffer) {
|
|
3678
3707
|
return createHash("sha256").update(buffer).digest("hex");
|
|
@@ -3693,12 +3722,10 @@ function getFile(hash) {
|
|
|
3693
3722
|
return null;
|
|
3694
3723
|
}
|
|
3695
3724
|
}
|
|
3696
|
-
var FILES_DIR;
|
|
3697
3725
|
var init_files = __esm({
|
|
3698
3726
|
"src/server/files.ts"() {
|
|
3699
3727
|
"use strict";
|
|
3700
3728
|
init_config();
|
|
3701
|
-
FILES_DIR = resolve2(process.cwd(), CONFIG.storage.files_dir);
|
|
3702
3729
|
}
|
|
3703
3730
|
});
|
|
3704
3731
|
|
|
@@ -13078,6 +13105,81 @@ var init_stdio = __esm({
|
|
|
13078
13105
|
}
|
|
13079
13106
|
});
|
|
13080
13107
|
|
|
13108
|
+
// package.json
|
|
13109
|
+
var require_package2 = __commonJS({
|
|
13110
|
+
"package.json"(exports, module2) {
|
|
13111
|
+
module2.exports = {
|
|
13112
|
+
name: "mnemosyne-core",
|
|
13113
|
+
version: "2.0.3",
|
|
13114
|
+
description: "Unified memory engine for AI agents \u2014 graph atoms, semantic search, and collaborative memory",
|
|
13115
|
+
logo: "logo.png",
|
|
13116
|
+
author: "Arman Aslanyan <aslanyanarman88@gmail.com> (https://www.linkedin.com/in/arman-aslanyan/)",
|
|
13117
|
+
main: "dist/index.js",
|
|
13118
|
+
module: "dist/index.js",
|
|
13119
|
+
types: "dist/index.d.ts",
|
|
13120
|
+
bin: {
|
|
13121
|
+
"mnemosyne-core": "./dist/cli/index.js"
|
|
13122
|
+
},
|
|
13123
|
+
exports: {
|
|
13124
|
+
".": {
|
|
13125
|
+
types: "./dist/index.d.ts",
|
|
13126
|
+
import: "./dist/index.js",
|
|
13127
|
+
require: "./dist/index.js"
|
|
13128
|
+
},
|
|
13129
|
+
"./sdk": {
|
|
13130
|
+
types: "./dist/sdk/index.d.ts",
|
|
13131
|
+
import: "./dist/sdk/index.js",
|
|
13132
|
+
require: "./dist/sdk/index.js"
|
|
13133
|
+
},
|
|
13134
|
+
"./ws": {
|
|
13135
|
+
types: "./dist/ws/index.d.ts",
|
|
13136
|
+
import: "./dist/ws/index.js",
|
|
13137
|
+
require: "./dist/ws/index.js"
|
|
13138
|
+
},
|
|
13139
|
+
"./mcp": {
|
|
13140
|
+
types: "./dist/mcp/index.d.ts",
|
|
13141
|
+
import: "./dist/mcp/index.js",
|
|
13142
|
+
require: "./dist/mcp/index.js"
|
|
13143
|
+
},
|
|
13144
|
+
"./cli": {
|
|
13145
|
+
types: "./dist/cli/index.d.ts",
|
|
13146
|
+
import: "./dist/cli/index.js",
|
|
13147
|
+
require: "./dist/cli/index.js"
|
|
13148
|
+
}
|
|
13149
|
+
},
|
|
13150
|
+
files: [
|
|
13151
|
+
"dist"
|
|
13152
|
+
],
|
|
13153
|
+
scripts: {
|
|
13154
|
+
start: "node dist/cli/index.js",
|
|
13155
|
+
dev: "tsx watch src/cli/index.ts",
|
|
13156
|
+
build: `tsup --config tsup.config.ts && node -e "require('fs').mkdirSync('dist/dashboard',{recursive:true});require('fs').copyFileSync('src/dashboard/index.html','dist/dashboard/index.html')"`,
|
|
13157
|
+
typecheck: "tsc --noEmit"
|
|
13158
|
+
},
|
|
13159
|
+
devDependencies: {
|
|
13160
|
+
"@types/adm-zip": "^0.5.8",
|
|
13161
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
13162
|
+
"@types/node": "^25.6.2",
|
|
13163
|
+
"@types/ws": "^8.18.1",
|
|
13164
|
+
commander: "^14.0.3",
|
|
13165
|
+
tsup: "^8.5.1",
|
|
13166
|
+
tsx: "^4.19.0",
|
|
13167
|
+
typescript: "^5.8.3",
|
|
13168
|
+
ws: "^8.18.0"
|
|
13169
|
+
},
|
|
13170
|
+
engines: {
|
|
13171
|
+
node: ">=20"
|
|
13172
|
+
},
|
|
13173
|
+
dependencies: {
|
|
13174
|
+
"@xenova/transformers": "^2.17.2",
|
|
13175
|
+
"adm-zip": "^0.5.17",
|
|
13176
|
+
"better-sqlite3": "^12.10.0",
|
|
13177
|
+
"sqlite-vec": "^0.1.9"
|
|
13178
|
+
}
|
|
13179
|
+
};
|
|
13180
|
+
}
|
|
13181
|
+
});
|
|
13182
|
+
|
|
13081
13183
|
// node_modules/commander/esm.mjs
|
|
13082
13184
|
var import_index = __toESM(require_commander(), 1);
|
|
13083
13185
|
var {
|
|
@@ -14323,9 +14425,26 @@ function parseYaml2(text) {
|
|
|
14323
14425
|
}
|
|
14324
14426
|
return root;
|
|
14325
14427
|
}
|
|
14428
|
+
function getVersion2() {
|
|
14429
|
+
try {
|
|
14430
|
+
const { readFileSync: readFileSync7 } = __require("fs");
|
|
14431
|
+
const { resolve: resolve13 } = __require("path");
|
|
14432
|
+
const pkg = JSON.parse(readFileSync7(resolve13(__dirname, "../../package.json"), "utf-8"));
|
|
14433
|
+
return pkg.version;
|
|
14434
|
+
} catch {
|
|
14435
|
+
try {
|
|
14436
|
+
const { readFileSync: readFileSync7 } = __require("fs");
|
|
14437
|
+
const { resolve: resolve13 } = __require("path");
|
|
14438
|
+
const pkg = JSON.parse(readFileSync7(resolve13(process.cwd(), "package.json"), "utf-8"));
|
|
14439
|
+
return pkg.version;
|
|
14440
|
+
} catch {
|
|
14441
|
+
return "2.0.3";
|
|
14442
|
+
}
|
|
14443
|
+
}
|
|
14444
|
+
}
|
|
14326
14445
|
function defaultConfig2() {
|
|
14327
14446
|
return {
|
|
14328
|
-
server: { port: 7321, host: "localhost", version:
|
|
14447
|
+
server: { port: 7321, host: "localhost", version: getVersion2() },
|
|
14329
14448
|
database: { path: "data/nexus.db", wal_mode: true, vec_extension_path: "data/vec0" },
|
|
14330
14449
|
storage: { files_dir: "data/files", max_file_size_mb: 50, backups_dir: "data/backups", backup_interval_hours: 24, max_backups: 7 },
|
|
14331
14450
|
limits: { max_atoms_per_project: 1e4, rate_limit_requests: 100, rate_limit_window_ms: 6e4 },
|
|
@@ -14612,7 +14731,13 @@ var Mnemosyne = class {
|
|
|
14612
14731
|
this.db.pragma("synchronous = NORMAL");
|
|
14613
14732
|
this.vecEnabled = false;
|
|
14614
14733
|
try {
|
|
14615
|
-
|
|
14734
|
+
let vecPath;
|
|
14735
|
+
try {
|
|
14736
|
+
const sqliteVec = __require("sqlite-vec");
|
|
14737
|
+
vecPath = sqliteVec.getLoadablePath();
|
|
14738
|
+
} catch {
|
|
14739
|
+
vecPath = resolve5(this.config.baseDirPath || process.cwd(), cfg.database.vec_extension_path);
|
|
14740
|
+
}
|
|
14616
14741
|
this.db.loadExtension(vecPath);
|
|
14617
14742
|
this.vecEnabled = true;
|
|
14618
14743
|
console.log("[DB] sqlite-vec extension loaded");
|
|
@@ -14894,6 +15019,23 @@ var TOOLS = [
|
|
|
14894
15019
|
];
|
|
14895
15020
|
|
|
14896
15021
|
// src/mcp/server.ts
|
|
15022
|
+
function getVersion3() {
|
|
15023
|
+
try {
|
|
15024
|
+
const { readFileSync: readFileSync7 } = __require("fs");
|
|
15025
|
+
const { resolve: resolve13 } = __require("path");
|
|
15026
|
+
const pkg = JSON.parse(readFileSync7(resolve13(__dirname, "../../package.json"), "utf-8"));
|
|
15027
|
+
return pkg.version;
|
|
15028
|
+
} catch {
|
|
15029
|
+
try {
|
|
15030
|
+
const { readFileSync: readFileSync7 } = __require("fs");
|
|
15031
|
+
const { resolve: resolve13 } = __require("path");
|
|
15032
|
+
const pkg = JSON.parse(readFileSync7(resolve13(process.cwd(), "package.json"), "utf-8"));
|
|
15033
|
+
return pkg.version;
|
|
15034
|
+
} catch {
|
|
15035
|
+
return "2.0.3";
|
|
15036
|
+
}
|
|
15037
|
+
}
|
|
15038
|
+
}
|
|
14897
15039
|
var McpServer = class {
|
|
14898
15040
|
store;
|
|
14899
15041
|
toolMap = /* @__PURE__ */ new Map();
|
|
@@ -14914,7 +15056,7 @@ var McpServer = class {
|
|
|
14914
15056
|
return this.ok(req.id, {
|
|
14915
15057
|
protocolVersion: "2024-11-05",
|
|
14916
15058
|
capabilities: { tools: {}, resources: {}, prompts: {} },
|
|
14917
|
-
serverInfo: { name: "mnemosyne-mcp", version:
|
|
15059
|
+
serverInfo: { name: "mnemosyne-mcp", version: getVersion3() }
|
|
14918
15060
|
});
|
|
14919
15061
|
case "tools/list":
|
|
14920
15062
|
return this.ok(req.id, {
|
|
@@ -14941,7 +15083,7 @@ var McpServer = class {
|
|
|
14941
15083
|
getManifest() {
|
|
14942
15084
|
return {
|
|
14943
15085
|
name: "Mnemosyne",
|
|
14944
|
-
version:
|
|
15086
|
+
version: getVersion3(),
|
|
14945
15087
|
description: "Knowledge base MCP server for projects, atoms, blocks, and bonds.",
|
|
14946
15088
|
protocol: "mcp",
|
|
14947
15089
|
transport: ["stdio", "sse"],
|
|
@@ -15822,7 +15964,7 @@ import { createHash as createHash2 } from "crypto";
|
|
|
15822
15964
|
import { readFileSync as readFileSync4, existsSync as existsSync5, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
15823
15965
|
import { resolve as resolve6 } from "path";
|
|
15824
15966
|
var DB_PATH = resolve6(process.cwd(), "data", "nexus.db");
|
|
15825
|
-
var
|
|
15967
|
+
var FILES_DIR = resolve6(process.cwd(), "data", "files");
|
|
15826
15968
|
function sha256File(path) {
|
|
15827
15969
|
return createHash2("sha256").update(readFileSync4(path)).digest("hex");
|
|
15828
15970
|
}
|
|
@@ -15842,11 +15984,11 @@ function sha256Dir(dir) {
|
|
|
15842
15984
|
function buildMnemosyneExport(projectId, projectName) {
|
|
15843
15985
|
const zip = new AdmZip2();
|
|
15844
15986
|
zip.addLocalFile(DB_PATH, "", "nexus.db");
|
|
15845
|
-
if (existsSync5(
|
|
15846
|
-
zip.addLocalFolder(
|
|
15987
|
+
if (existsSync5(FILES_DIR)) {
|
|
15988
|
+
zip.addLocalFolder(FILES_DIR, "files");
|
|
15847
15989
|
}
|
|
15848
15990
|
const dbChecksum = sha256File(DB_PATH);
|
|
15849
|
-
const filesChecksum = existsSync5(
|
|
15991
|
+
const filesChecksum = existsSync5(FILES_DIR) ? sha256Dir(FILES_DIR) : "";
|
|
15850
15992
|
const manifest = {
|
|
15851
15993
|
version: "1.1",
|
|
15852
15994
|
app: "Mnemosyne",
|
|
@@ -15972,12 +16114,20 @@ function handleEvents(store, pathname, method, res, searchParams) {
|
|
|
15972
16114
|
}
|
|
15973
16115
|
|
|
15974
16116
|
// src/api/routes/health.ts
|
|
16117
|
+
var PKG_VERSION = (() => {
|
|
16118
|
+
try {
|
|
16119
|
+
const pkg = JSON.parse(__require("fs").readFileSync(__require("path").resolve(__dirname, "../../../package.json"), "utf-8"));
|
|
16120
|
+
return pkg.version;
|
|
16121
|
+
} catch {
|
|
16122
|
+
return "2.0.3";
|
|
16123
|
+
}
|
|
16124
|
+
})();
|
|
15975
16125
|
function handleHealth(store, pathname, method, res) {
|
|
15976
|
-
if (pathname === "/health" && method === "GET") {
|
|
16126
|
+
if ((pathname === "/health" || pathname === "/api/v1/health") && method === "GET") {
|
|
15977
16127
|
const stats = store.getStats();
|
|
15978
16128
|
json(res, 200, {
|
|
15979
16129
|
status: "ok",
|
|
15980
|
-
version:
|
|
16130
|
+
version: PKG_VERSION,
|
|
15981
16131
|
storage: "sqlite",
|
|
15982
16132
|
database: store.config.database.path,
|
|
15983
16133
|
uptime: process.uptime(),
|
|
@@ -16204,18 +16354,20 @@ var WebSocketHandler = class {
|
|
|
16204
16354
|
init_config();
|
|
16205
16355
|
import Database2 from "better-sqlite3";
|
|
16206
16356
|
import { resolve as resolve7 } from "path";
|
|
16207
|
-
|
|
16357
|
+
function getDbPath() {
|
|
16358
|
+
return process.env.MNEMOSYNE_DB_PATH || resolve7(process.cwd(), CONFIG.database.path);
|
|
16359
|
+
}
|
|
16208
16360
|
var db = null;
|
|
16209
16361
|
var vecEnabled = false;
|
|
16210
16362
|
function getDb() {
|
|
16211
16363
|
if (!db) {
|
|
16212
|
-
db = new Database2(
|
|
16364
|
+
db = new Database2(getDbPath());
|
|
16213
16365
|
db.pragma("journal_mode = WAL");
|
|
16214
16366
|
db.pragma("foreign_keys = ON");
|
|
16215
16367
|
db.pragma("synchronous = NORMAL");
|
|
16216
16368
|
try {
|
|
16217
|
-
const
|
|
16218
|
-
db.loadExtension(
|
|
16369
|
+
const { getLoadablePath } = __require("sqlite-vec");
|
|
16370
|
+
db.loadExtension(getLoadablePath());
|
|
16219
16371
|
vecEnabled = true;
|
|
16220
16372
|
console.log("[DB] sqlite-vec extension loaded");
|
|
16221
16373
|
} catch (err) {
|
|
@@ -16254,7 +16406,6 @@ var Store2 = class extends Store {
|
|
|
16254
16406
|
};
|
|
16255
16407
|
|
|
16256
16408
|
// src/server/MnemosyneServer.ts
|
|
16257
|
-
init_config();
|
|
16258
16409
|
var MnemosyneServer = class {
|
|
16259
16410
|
store;
|
|
16260
16411
|
api;
|
|
@@ -16262,8 +16413,9 @@ var MnemosyneServer = class {
|
|
|
16262
16413
|
httpServer;
|
|
16263
16414
|
brain;
|
|
16264
16415
|
constructor(options = {}, brain) {
|
|
16265
|
-
const
|
|
16266
|
-
const
|
|
16416
|
+
const cfg = brain?.config?.config;
|
|
16417
|
+
const port = options.port ?? cfg?.server?.port ?? 7321;
|
|
16418
|
+
const host = options.host ?? cfg?.server?.host ?? "localhost";
|
|
16267
16419
|
const enableDashboard = options.dashboard !== false;
|
|
16268
16420
|
const enableWebsocket = options.websocket !== false;
|
|
16269
16421
|
process.on("uncaughtException", (err) => {
|
|
@@ -16291,8 +16443,9 @@ var MnemosyneServer = class {
|
|
|
16291
16443
|
const wss = new import_websocket_server.default({ server: this.httpServer });
|
|
16292
16444
|
this.wsHandler = new WebSocketHandler(wss, this.store);
|
|
16293
16445
|
}
|
|
16446
|
+
const version = cfg?.server?.version || "2.0.3";
|
|
16294
16447
|
this.httpServer.listen(port, () => {
|
|
16295
|
-
console.log(`Mnemosyne v${
|
|
16448
|
+
console.log(`Mnemosyne v${version} \u2014 port ${port}`);
|
|
16296
16449
|
console.log(`Dashboard: http://${host}:${port}/dashboard`);
|
|
16297
16450
|
console.log(`API: http://${host}:${port}/api/v1`);
|
|
16298
16451
|
console.log(`MCP: http://${host}:${port}/mcp/manifest`);
|
|
@@ -16317,7 +16470,8 @@ var MnemosyneServer = class {
|
|
|
16317
16470
|
};
|
|
16318
16471
|
const dirs = [
|
|
16319
16472
|
resolve8(process.cwd(), "src/dashboard"),
|
|
16320
|
-
resolve8(process.cwd(), "dashboard")
|
|
16473
|
+
resolve8(process.cwd(), "dashboard"),
|
|
16474
|
+
resolve8(__dirname, "../dashboard")
|
|
16321
16475
|
];
|
|
16322
16476
|
for (const dir of dirs) {
|
|
16323
16477
|
const filePath = resolve8(dir, urlPath);
|
|
@@ -16341,6 +16495,15 @@ var MnemosyneServer = class {
|
|
|
16341
16495
|
};
|
|
16342
16496
|
|
|
16343
16497
|
// src/cli/commands/start.ts
|
|
16498
|
+
function getVersion4() {
|
|
16499
|
+
try {
|
|
16500
|
+
const { readFileSync: readFileSync7 } = __require("fs");
|
|
16501
|
+
const { resolve: resolve13 } = __require("path");
|
|
16502
|
+
return JSON.parse(readFileSync7(resolve13(__dirname, "../../../package.json"), "utf-8")).version;
|
|
16503
|
+
} catch {
|
|
16504
|
+
return "2.0.3";
|
|
16505
|
+
}
|
|
16506
|
+
}
|
|
16344
16507
|
async function startCommand(options) {
|
|
16345
16508
|
const dataDir = resolve9(options.dataDir);
|
|
16346
16509
|
const dbPath = resolve9(dataDir, "nexus.db");
|
|
@@ -16348,7 +16511,7 @@ async function startCommand(options) {
|
|
|
16348
16511
|
await brain.init();
|
|
16349
16512
|
if (options.mcpTransport === "stdio" && options.mcp) {
|
|
16350
16513
|
if (options.verbose) {
|
|
16351
|
-
console.error(`\u{1F9E0} Mnemosyne
|
|
16514
|
+
console.error(`\u{1F9E0} Mnemosyne v${getVersion4()} (stdio mode)`);
|
|
16352
16515
|
console.error(` dbPath: ${dbPath}`);
|
|
16353
16516
|
}
|
|
16354
16517
|
const mcpServer = new McpServer(brain.store);
|
|
@@ -16358,7 +16521,7 @@ async function startCommand(options) {
|
|
|
16358
16521
|
return;
|
|
16359
16522
|
}
|
|
16360
16523
|
const port = parseInt(options.port, 10);
|
|
16361
|
-
console.log(`\u{1F9E0} Mnemosyne
|
|
16524
|
+
console.log(`\u{1F9E0} Mnemosyne v${getVersion4()}`);
|
|
16362
16525
|
if (options.verbose) {
|
|
16363
16526
|
console.log(` dataDir: ${dataDir}`);
|
|
16364
16527
|
console.log(` dbPath: ${dbPath}`);
|
|
@@ -16539,7 +16702,13 @@ async function exportCommand(options) {
|
|
|
16539
16702
|
|
|
16540
16703
|
// src/cli/index.ts
|
|
16541
16704
|
var program2 = new Command();
|
|
16542
|
-
program2.name("mnemosyne").description("Mnemosyne \u2014 Your exocortex").version(
|
|
16705
|
+
program2.name("mnemosyne").description("Mnemosyne \u2014 Your exocortex").version((() => {
|
|
16706
|
+
try {
|
|
16707
|
+
return require_package2().version;
|
|
16708
|
+
} catch {
|
|
16709
|
+
return "2.0.3";
|
|
16710
|
+
}
|
|
16711
|
+
})());
|
|
16543
16712
|
program2.command("init").description("Initialize a new Mnemosyne workspace").option("-d, --data-dir <path>", "Data directory", "./data").option("-c, --config <path>", "Config file path").action(initCommand);
|
|
16544
16713
|
program2.command("start").description("Start the Mnemosyne server").option("-p, --port <number>", "Port to listen on", "7321").option("-h, --host <string>", "Host to bind to", "localhost").option("-d, --data-dir <path>", "Data directory", "./data").option("--mcp", "Enable MCP server", true).option("--mcp-transport <type>", "MCP transport: sse or stdio", "sse").option("--no-dashboard", "Disable dashboard serving").option("-c, --config <path>", "Config file path").option("-v, --verbose", "Enable verbose logging").action(startCommand);
|
|
16545
16714
|
program2.command("migrate").description("Migrate from v1.0 JSON to v2.0 SQLite").requiredOption("--from <path>", "Path to v1.0 mnemosyne.db.json").requiredOption("--to <path>", "Path to v2.0 nexus.db").action(migrateCommand);
|