@phren/cli 0.0.22 → 0.0.23

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/mcp/dist/init.js +12 -3
  2. package/package.json +1 -1
package/mcp/dist/init.js CHANGED
@@ -104,9 +104,18 @@ function parseRiskySectionsAnswer(raw, fallback) {
104
104
  return Array.from(new Set(parsed));
105
105
  }
106
106
  function hasInstallMarkers(phrenPath) {
107
- return fs.existsSync(phrenPath) && (fs.existsSync(path.join(phrenPath, "machines.yaml")) ||
108
- fs.existsSync(path.join(phrenPath, ".config")) ||
109
- fs.existsSync(path.join(phrenPath, "global")));
107
+ // Require at least two markers to consider this a real install.
108
+ // A partial clone or failed init may create one directory but not finish.
109
+ if (!fs.existsSync(phrenPath))
110
+ return false;
111
+ let found = 0;
112
+ if (fs.existsSync(path.join(phrenPath, "machines.yaml")))
113
+ found++;
114
+ if (fs.existsSync(path.join(phrenPath, ".config")))
115
+ found++;
116
+ if (fs.existsSync(path.join(phrenPath, "global")))
117
+ found++;
118
+ return found >= 2;
110
119
  }
111
120
  function resolveInitPhrenPath(opts) {
112
121
  const raw = opts._walkthroughStoragePath || (process.env.PHREN_PATH) || DEFAULT_PHREN_PATH;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phren/cli",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Knowledge layer for AI agents. Phren learns and recalls.",
5
5
  "type": "module",
6
6
  "bin": {