@lotargo/memory_plugin 1.0.1 → 1.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.
@@ -41,7 +41,10 @@ async function writeMemory(key, entries) {
41
41
  }
42
42
 
43
43
  function today() {
44
- return new Date().toISOString().slice(0, 10);
44
+ const d = new Date();
45
+ const date = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
46
+ const time = `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
47
+ return `${date} ${time}`;
45
48
  }
46
49
 
47
50
  async function notify(client, message, variant = "success") {
@@ -2,6 +2,7 @@
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import * as z from "zod/v4";
5
+ import { ensureDir, readMemory, readMemoryRaw, writeMemory, today, MEMORY_DIR, GLOBAL_KEY, scopeKey, projectName } from "./memory.js";
5
6
  const cliArgs = process.argv.slice(2);
6
7
  if (cliArgs.includes("setup") || cliArgs.includes("install") || cliArgs.includes("--setup") || cliArgs.includes("-s")) {
7
8
  const { runSetup } = await import("./setup.js");
@@ -41,5 +41,8 @@ export async function writeMemory(key, entries) {
41
41
  }
42
42
 
43
43
  export function today() {
44
- return new Date().toISOString().slice(0, 10);
44
+ const d = new Date();
45
+ const date = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
46
+ const time = `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
47
+ return `${date} ${time}`;
45
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotargo/memory_plugin",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Persistent memory agent for coding AI tools — remembers user preferences and project context across sessions. Works with Antigravity, OpenCode, Claude Code, and Codex.",
5
5
  "type": "module",
6
6
  "main": ".opencode/plugins/memory-plugin.js",