lucid-mem 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/lib/core.mjs +13 -2
  2. package/package.json +1 -1
package/lib/core.mjs CHANGED
@@ -24,8 +24,19 @@ export function sh(cmd, args, opts = {}) {
24
24
 
25
25
  export const git = (repo, args, opts) => sh('git', ['-C', repo, ...args], opts);
26
26
 
27
- const samePath = (a, b) =>
28
- path.resolve(a).toLowerCase() === path.resolve(b).toLowerCase();
27
+ // Canonicalize before comparing: git reports the long form of paths
28
+ // while env vars may carry 8.3 aliases (RUNNER~1) or symlinks.
29
+ const canon = (p) => {
30
+ const r = path.resolve(p);
31
+ // .native expands 8.3 aliases and symlinks; plain realpathSync keeps
32
+ // 8.3 names as-is on Windows (verified).
33
+ try {
34
+ return fs.realpathSync.native(r);
35
+ } catch {
36
+ return r;
37
+ }
38
+ };
39
+ const samePath = (a, b) => canon(a).toLowerCase() === canon(b).toLowerCase();
29
40
 
30
41
  export function isMemoryRepo(dir) {
31
42
  if (!fs.existsSync(path.join(dir, 'MEMORY.md'))) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-mem",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "lucid-mem (amr) - autonomous git-backed agent memory (Agent Memory Repo spec)",
5
5
  "type": "module",
6
6
  "bin": {