@lotargo/memory_plugin 1.6.4 → 1.6.5

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/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.6.5] - 2026-08-17
11
+
12
+ ### Added
13
+
14
+ - Added explicit `directory` (and `project` alias) parameter support to Notebook/Memory tools (`remember`, `recall`, `get_fact`, `forget`, `update_fact`, `memory_info`, `link_knowledge`) and RAG tools (`ingest_document`, `query_knowledge_base`, `batch_query_knowledge_base`, `manage_knowledge_base`) across both the MCP server and native OpenCode plugin.
15
+
16
+ ### Fixed
17
+
18
+ - Fixed cross-directory workspace routing and isolation so operations targeting external project paths work reliably without directory mismatch or leaking npm process `INIT_CWD`.
19
+ - Fixed `batch_query_knowledge_base` query execution and result formatting in the MCP server.
20
+
10
21
  ## [1.6.4] - 2026-08-13
11
22
 
12
23
  ### Added
@@ -48,8 +48,18 @@ export function ensureDirSync() {
48
48
  if (!existsSync(exportsDir)) mkdirSync(exportsDir, { recursive: true });
49
49
  }
50
50
 
51
+ export function getActiveWorkspaceDir() {
52
+ return (
53
+ process.env.WORKSPACE_DIR ||
54
+ process.env.PROJECT_DIR ||
55
+ process.env.OPENCODE_WORKSPACE ||
56
+ process.env.IDE_WORKSPACE ||
57
+ null
58
+ );
59
+ }
60
+
51
61
  export function canonicalPath(dir) {
52
- let p = resolve(dir || process.cwd());
62
+ let p = resolve(dir || getActiveWorkspaceDir() || process.cwd());
53
63
  if (process.platform === "win32") {
54
64
  p = p.replace(/\\/g, "/").replace(/^([a-zA-Z]):/, (_, d) => `${d.toLowerCase()}:`);
55
65
  }
@@ -57,13 +67,13 @@ export function canonicalPath(dir) {
57
67
  }
58
68
 
59
69
  export async function projectKey(worktree, directory) {
60
- const dir = worktree || directory || process.cwd();
70
+ const dir = worktree || directory || getActiveWorkspaceDir() || process.cwd();
61
71
  const identity = await resolveProjectIdentity(dir);
62
72
  return identity ? identity.key : null;
63
73
  }
64
74
 
65
75
  export async function projectName(worktree, directory) {
66
- const dir = worktree || directory || process.cwd();
76
+ const dir = worktree || directory || getActiveWorkspaceDir() || process.cwd();
67
77
  const identity = await resolveProjectIdentity(dir);
68
78
  return identity ? identity.name : (dir ? basename(resolve(dir)) : "default");
69
79
  }