@mndrk/agx 1.4.1 → 1.4.2

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/index.js +9 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -160,9 +160,18 @@ function findMemDir(startDir = process.cwd()) {
160
160
  if (fs.existsSync(indexFile)) {
161
161
  try {
162
162
  const index = JSON.parse(fs.readFileSync(indexFile, 'utf8'));
163
+ // Exact match
163
164
  if (index[startDir]) {
164
165
  return globalMem;
165
166
  }
167
+ // Check parent directories (for monorepo/subdirectory usage)
168
+ let checkDir = startDir;
169
+ while (checkDir !== path.dirname(checkDir)) {
170
+ checkDir = path.dirname(checkDir);
171
+ if (index[checkDir]) {
172
+ return globalMem;
173
+ }
174
+ }
166
175
  } catch {}
167
176
  }
168
177
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mndrk/agx",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Unified AI Agent Wrapper for Gemini, Claude, and Ollama",
5
5
  "main": "index.js",
6
6
  "bin": {