@illli-studio/mory 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -5,6 +5,7 @@ Local-first memory runtime with a web console and a generic MCP server.
5
5
  ```bash
6
6
  npm install -g @illli-studio/mory
7
7
  mory init
8
+ mory --version
8
9
  mory start
9
10
  mory start --background
10
11
  mory status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@illli-studio/mory",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Local-first memory runtime with a web console and MCP server.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "publishConfig": { "access": "public" },
package/src/cli.mjs CHANGED
@@ -8,6 +8,7 @@ import { fileURLToPath } from "node:url";
8
8
  import { runMcp } from "./mcp.mjs";
9
9
 
10
10
  const packageRoot = resolve(fileURLToPath(new URL("..", import.meta.url)));
11
+ const runtimeVersion = "0.1.4";
11
12
  const repoRoot = resolve(packageRoot, "../..");
12
13
  const dataDir = process.env.MORY_HOME || join(homedir(), ".mory");
13
14
  const configPath = join(dataDir, "config.json");
@@ -103,7 +104,8 @@ async function importMemories(inputPath) {
103
104
 
104
105
  const [command = "start", ...args] = process.argv.slice(2);
105
106
  try {
106
- if (command === "init") { config(); console.log(`Initialized Mory at ${dataDir}`); }
107
+ if (command === "--version" || command === "-v" || command === "version") console.log(runtimeVersion);
108
+ else if (command === "init") { config(); console.log(`Initialized Mory at ${dataDir}`); }
107
109
  else if (command === "start") await start(args.includes("--background") || args.includes("-d"));
108
110
  else if (command === "stop") await stop();
109
111
  else if (command === "export") await exportMemories(args[0]);
package/src/mcp.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  const protocolVersion = "2025-06-18";
2
+ const runtimeVersion = "0.1.4";
2
3
 
3
4
  async function callApi(baseUrl, token, path, method = "POST", body) {
4
5
  const response = await fetch(baseUrl.replace(/\/$/, "") + path, { method, headers: { authorization: `Bearer ${token}`, "content-type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body) });
@@ -17,7 +18,7 @@ const tools = [
17
18
  ];
18
19
 
19
20
  async function handle(message, options) {
20
- if (message.method === "initialize") return { protocolVersion, capabilities: { tools: {} }, serverInfo: { name: "mory", version: "0.1.0" } };
21
+ if (message.method === "initialize") return { protocolVersion, capabilities: { tools: {} }, serverInfo: { name: "mory", version: runtimeVersion } };
21
22
  if (message.method === "notifications/initialized") return null;
22
23
  if (message.method === "tools/list") return { tools };
23
24
  if (message.method !== "tools/call") return {};